diff options
author | Tom Fuertes <tomfuertes@gmail.com> | 2013-03-24 23:47:46 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-03-26 20:50:30 -0400 |
commit | 1f530e286755416369f4452d20f5ab6bb175451d (patch) | |
tree | 3e220353e0b6289a19218ba90b9d049068e7711f /Gruntfile.js | |
parent | 100d3c351604e1f9641098da2e78678b4e6d9cdf (diff) | |
download | jquery-1f530e286755416369f4452d20f5ab6bb175451d.tar.gz jquery-1f530e286755416369f4452d20f5ab6bb175451d.zip |
No ticker: grunt_compare_size options. Close gh-1210.
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index afa090c3d..fb8b1e8b0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,6 +7,7 @@ module.exports = function( grunt ) { "dist/jquery.min.map", "dist/jquery.min.js" ], + gzip = require("gzip-js"), readOptionalJSON = function( filepath ) { var data = {}; try { @@ -19,7 +20,15 @@ module.exports = function( grunt ) { pkg: grunt.file.readJSON("package.json"), dst: readOptionalJSON("dist/.destination.json"), compare_size: { - files: distpaths + files: [ "dist/jquery.js", "dist/jquery.min.js" ], + options: { + compress: { + gz: function( contents ) { + return gzip.zip( contents, {} ).length; + } + }, + cache: "dist/.sizecache.json" + } }, selector: { destFile: "src/selector-sizzle.js", |