aboutsummaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorTom Fuertes <tomfuertes@gmail.com>2013-03-24 23:47:46 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-03-26 20:54:07 -0400
commite3a802cbf7d66d88e3659ad344bce86b99d029be (patch)
treed7038c0bccb028d8b06e2c4076d18574ec363a7c /Gruntfile.js
parent131de8c80ed8d184104122315196e5aba9d8bb63 (diff)
downloadjquery-e3a802cbf7d66d88e3659ad344bce86b99d029be.tar.gz
jquery-e3a802cbf7d66d88e3659ad344bce86b99d029be.zip
No ticker: grunt_compare_size options. Close gh-1210.
(cherry picked from commit 1f530e286755416369f4452d20f5ab6bb175451d)
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 7180a8a27..c6b739d17 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",