}
},
- 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',
+ ]
+ }
}
},
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
},
- recess: {
+ less: {
files: 'less/*.less',
- tasks: ['recess']
+ tasks: ['less']
}
},
// 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');
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']);
, "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"