Skip to content

Instantly share code, notes, and snippets.

@t32k
Created February 17, 2013 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t32k/4969724 to your computer and use it in GitHub Desktop.
Save t32k/4969724 to your computer and use it in GitHub Desktop.
// 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