File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
module . exports = function ( grunt ) {
4
4
5
+ const gzip = require ( "gzip-js" ) ;
6
+
5
7
// files
6
8
const coreFiles = [
7
9
"core.js" ,
@@ -75,7 +77,15 @@ const compareFiles = {
75
77
all : [
76
78
"dist/jquery-ui.js" ,
77
79
"dist/jquery-ui.min.js"
78
- ]
80
+ ] ,
81
+ options : {
82
+ compress : {
83
+ gz : function ( contents ) {
84
+ return gzip . zip ( contents , { } ) . length ;
85
+ }
86
+ } ,
87
+ cache : "build/.sizecache.json"
88
+ }
79
89
} ;
80
90
81
91
const htmllintBad = [
@@ -115,8 +125,6 @@ uiFiles.concat( allI18nFiles ).forEach( function( file ) {
115
125
} ) ;
116
126
117
127
uiFiles . forEach ( function ( file ) {
118
-
119
- // TODO this doesn't do anything until https://github.com/rwldrn/grunt-compare-size/issues/13
120
128
compareFiles [ file ] = [ file , mapMinFile ( file ) ] ;
121
129
} ) ;
122
130
Original file line number Diff line number Diff line change 74
74
"grunt-eslint" : " 24.0.1" ,
75
75
"grunt-git-authors" : " 3.2.0" ,
76
76
"grunt-html" : " 16.0.0" ,
77
+ "gzip-js" : " 0.3.2" ,
77
78
"load-grunt-tasks" : " 5.1.0" ,
78
79
"rimraf" : " 4.4.1" ,
79
80
"selenium-webdriver" : " 4.18.1" ,
You can’t perform that action at this time.
0 commit comments