diff options
| author | XhmikosR <[email protected]> | 2013-09-18 08:45:38 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2013-12-08 13:05:10 +0200 |
| commit | fdc5d1dc34bf28e55c6359aeb098e608585ca6cb (patch) | |
| tree | 3cf0671cdb4ba8543101833c806e68496bceaca5 /Gruntfile.js | |
| parent | b5613c9af5ed412aace32419378137bf64342203 (diff) | |
| download | bootstrap-fdc5d1dc34bf28e55c6359aeb098e608585ca6cb.tar.xz bootstrap-fdc5d1dc34bf28e55c6359aeb098e608585ca6cb.zip | |
Minify css with clean-css.
Diffstat (limited to 'Gruntfile.js')
| -rw-r--r-- | Gruntfile.js | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index f7da24f8b..721c81982 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -82,6 +82,21 @@ module.exports = function (grunt) { } }, + cssmin: { + compress: { + options: { + banner: '<%= banner %>', + keepSpecialComments: 0, + report: 'min', + selectorsMergeMode: 'ie8' + }, + files: { + 'dist/css/<%= pkg.name %>.min.css': '<%= recess.bootstrap.dest %>', + 'dist/css/<%= pkg.name %>-theme.min.css': '<%= recess.theme.dest %>' + } + } + }, + uglify: { options: { banner: '<%= banner %>', @@ -112,23 +127,9 @@ module.exports = function (grunt) { src: ['less/bootstrap.less'], dest: 'dist/css/<%= pkg.name %>.css' }, - min: { - 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' - }, - theme_min: { - options: { - compress: true - }, - src: ['less/theme.less'], - dest: 'dist/css/<%= pkg.name %>-theme.min.css' } }, @@ -300,6 +301,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-uglify'); @@ -327,7 +329,7 @@ module.exports = function (grunt) { grunt.registerTask('dist-js', ['concat', 'uglify']); // CSS distribution task. - grunt.registerTask('dist-css', ['recess']); + grunt.registerTask('dist-css', ['recess', 'cssmin']); // Fonts distribution task. grunt.registerTask('dist-fonts', ['copy']); |
