diff options
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index d737dbef7..05e83c961 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,6 +2,8 @@ module.exports = function( grunt ) { +const { gzipSync } = require( "node:zlib" ); + // files const coreFiles = [ "widget.js", @@ -74,7 +76,15 @@ const compareFiles = { all: [ "dist/jquery-ui.js", "dist/jquery-ui.min.js" - ] + ], + options: { + compress: { + gz: function( contents ) { + return gzipSync( contents ).length; + } + }, + cache: "build/.sizecache.json" + } }; const htmllintBad = [ @@ -105,8 +115,6 @@ uiFiles.concat( allI18nFiles ).forEach( function( file ) { } ); uiFiles.forEach( function( file ) { - - // TODO this doesn't do anything until https://github.com/rwldrn/grunt-compare-size/issues/13 compareFiles[ file ] = [ file, mapMinFile( file ) ]; } ); |