diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-03-10 13:53:53 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-03-10 13:53:53 +0100 |
commit | 5e6fc4f086e72e9f247426f2cbe4a3cd7a2013fd (patch) | |
tree | c3eea87adc61439bd79dec25af83b2c7a4bdecb3 /grunt.js | |
parent | fd9b7d3475870cff054b0b21a310fb21e05ed794 (diff) | |
download | jquery-ui-5e6fc4f086e72e9f247426f2cbe4a3cd7a2013fd.tar.gz jquery-ui-5e6fc4f086e72e9f247426f2cbe4a3cd7a2013fd.zip |
Build/grunt: Simplify css_min basic task, concat helper already takes care of executing directives
Diffstat (limited to 'grunt.js')
-rw-r--r-- | grunt.js | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -375,22 +375,9 @@ task.registerBasicTask('csslint', 'Lint CSS files with csslint', function() { }); task.registerBasicTask( 'css_min', 'Minify CSS files with Sqwish.', function() { - var files = file.expand( this.file.src ); - // Get banner, if specified. It would be nice if UglifyJS supported ignoring - // all comments matching a certain pattern, like /*!...*/, but it doesn't. - var banner = task.directive(files[0], function() { return null; }); - if (banner === null) { - banner = ''; - } else { - files.shift(); - } - var max = task.helper( 'concat', files ); - // Concat banner + minified source. - var min = banner + require('sqwish').minify( max, false ); + var max = task.helper( 'concat', file.expand( this.file.src ) ); + var min = require('sqwish').minify( max, false ); file.write( this.file.dest, min ); - if ( task.hadErrors() ) { - return false; - } log.writeln( 'File "' + this.file.dest + '" created.' ); task.helper( 'min_max_info', min, max ); }); |