Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module.exports = function( grunt ) {

const gzip = require( "gzip-js" );

// files
const coreFiles = [
"core.js",
Expand Down Expand Up @@ -75,7 +77,15 @@ const compareFiles = {
all: [
"dist/jquery-ui.js",
"dist/jquery-ui.min.js"
]
],
options: {
compress: {
gz: function( contents ) {
return gzip.zip( contents, {} ).length;
Comment thread
timmywil marked this conversation as resolved.
Outdated
}
},
cache: "build/.sizecache.json"
}
};

const htmllintBad = [
Expand Down Expand Up @@ -115,8 +125,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 ) ];
} );

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"grunt-eslint": "24.0.1",
"grunt-git-authors": "3.2.0",
"grunt-html": "16.0.0",
"gzip-js": "0.3.2",
"load-grunt-tasks": "5.1.0",
"rimraf": "4.4.1",
"selenium-webdriver": "4.18.1",
Expand Down