aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-08 19:09:27 -0800
committerMark Otto <[email protected]>2013-12-08 19:09:27 -0800
commitc0200426ee72b165de400db740a60bae5d344b3c (patch)
tree3f650975ea4ec88eb1beea15927276e2d4560153
parent768f8b00f3cb25b83720a955f45f73f960e668c8 (diff)
downloadbootstrap-c0200426ee72b165de400db740a60bae5d344b3c.tar.xz
bootstrap-c0200426ee72b165de400db740a60bae5d344b3c.zip
Drop grunt-recess for grunt-contrib-less & co
-rw-r--r--Gruntfile.js82
-rw-r--r--package.json4
2 files changed, 62 insertions, 24 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index f7da24f8b..1f3cf8d28 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -103,32 +103,65 @@ module.exports = function (grunt) {
}
},
- recess: {
- options: {
- compile: true,
- banner: '<%= banner %>'
- },
- bootstrap: {
- src: ['less/bootstrap.less'],
- dest: 'dist/css/<%= pkg.name %>.css'
+ less: {
+ compile: {
+ files: {
+ 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less',
+ 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less'
+ }
},
- min: {
+ minify: {
options: {
compress: true
},
- src: ['less/bootstrap.less'],
- dest: 'dist/css/<%= pkg.name %>.min.css'
- },
- theme: {
- src: ['less/theme.less'],
- dest: 'dist/css/<%= pkg.name %>-theme.css'
+ files: {
+ 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
+ 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css'
+ }
+ }
+ },
+
+ csscomb: {
+ options: {
+ // sortOrder: '/.csscomb.json',
+ "always-semicolon": true,
+ "block-indent": true,
+ "colon-space": true,
+ "color-case": "lower",
+ "color-shorthand": true,
+ "combinator-space": true,
+ "element-case": "lower",
+ "eof-newline": true,
+ "leading-zero": false,
+ "remove-empty-rulesets": true,
+ "rule-indent": true,
+ "stick-brace": "\n",
+ "strip-spaces": true,
+ "unitless-zero": true,
+ "vendor-prefix-align": true
},
- theme_min: {
+ files: {
+ 'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'],
+ 'dist/css/<%= pkg.name %>.min.sorted.css': ['dist/css/<%= pkg.name %>.min.css'],
+ 'dist/css/<%= pkg.name %>-theme.sorted.css': ['dist/css/<%= pkg.name %>-theme.css'],
+ 'dist/css/<%= pkg.name %>-theme.min.sorted.css': ['dist/css/<%= pkg.name %>-theme.min.css']
+ }
+ },
+
+ usebanner: {
+ dist: {
options: {
- compress: true
+ position: 'top',
+ banner: '<%= banner %>'
},
- src: ['less/theme.less'],
- dest: 'dist/css/<%= pkg.name %>-theme.min.css'
+ files: {
+ src: [
+ 'dist/css/<%= pkg.name %>.css',
+ 'dist/css/<%= pkg.name %>.min.css',
+ 'dist/css/<%= pkg.name %>-theme.css',
+ 'dist/css/<%= pkg.name %>-theme.min.css',
+ ]
+ }
}
},
@@ -182,9 +215,9 @@ module.exports = function (grunt) {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
},
- recess: {
+ less: {
files: 'less/*.less',
- tasks: ['recess']
+ tasks: ['less']
}
},
@@ -296,18 +329,21 @@ module.exports = function (grunt) {
// These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-csscomb');
grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-jscs-checker');
- grunt.loadNpmTasks('grunt-recess');
+ // grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-sed');
@@ -327,7 +363,7 @@ module.exports = function (grunt) {
grunt.registerTask('dist-js', ['concat', 'uglify']);
// CSS distribution task.
- grunt.registerTask('dist-css', ['recess']);
+ grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']);
// Fonts distribution task.
grunt.registerTask('dist-fonts', ['copy']);
diff --git a/package.json b/package.json
index 3c9fd7fe6..a69639ca2 100644
--- a/package.json
+++ b/package.json
@@ -22,18 +22,20 @@
, "devDependencies": {
"btoa": "~1.1.1"
, "grunt": "~0.4.1"
+ , "grunt-banner": "~0.2.0"
, "grunt-contrib-clean": "~0.5.0"
, "grunt-contrib-concat": "~0.3.0"
, "grunt-contrib-connect": "~0.5.0"
, "grunt-contrib-copy": "~0.4.1"
, "grunt-contrib-jshint": "~0.7.0"
+ , "grunt-contrib-less": "~0.8.0"
, "grunt-contrib-qunit": "~0.3.0"
, "grunt-contrib-uglify": "~0.2.4"
, "grunt-contrib-watch": "~0.5.3"
+ , "grunt-csscomb": "~1.1.0"
, "grunt-html-validation": "~0.1.6"
, "grunt-jekyll": "~0.4.0"
, "grunt-jscs-checker": "~0.2.5"
- , "grunt-recess": "~0.5.0"
, "grunt-saucelabs": "~4.1.2"
, "grunt-sed": "~0.1.1"
, "regexp-quote": "~0.0.0"