Created
February 17, 2013 02:09
-
-
Save t32k/4969724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Log min and max info | |
function minMaxGzip(src) { | |
return src ? require('gzip-js').zip(src, {}) : ''; | |
} | |
exports.minMaxInfo = function(min, max) { | |
var gzipSize = String(minMaxGzip(min).length); | |
grunt.log.writeln('Uncompressed size: ' + String(max.length).green + ' bytes.'); | |
grunt.log.writeln('Compressed size: ' + gzipSize.green + ' bytes gzipped (' + String(min.length).green + ' bytes minified).'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment