File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
vendor/modstart/modstart/resources/asset/src/mod Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ class AppConstant
6
6
{
7
7
const APP = 'blog ' ;
8
8
const APP_NAME = 'ModStartBlog ' ;
9
- const VERSION = '5.8 .0 ' ;
9
+ const VERSION = '5.9 .0 ' ;
10
10
}
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ module.exports = function (dirname) {
64
64
}
65
65
66
66
let cleanFilesCommands = [ ]
67
+ console . log ( "remove old files" )
67
68
switch ( config . platform ) {
68
69
case 'windows' :
69
70
cleanFilesCommands . push ( files . length > 0 ? 'del /F ' + files . join ( ' ' ) : 'cd' )
@@ -132,15 +133,24 @@ module.exports = function (dirname) {
132
133
console . error ( err ) ;
133
134
return ;
134
135
}
135
- const codeCompress = UglifyJS . minify ( data , {
136
+ console . log ( `begin ${ fileFullPath } (${ data . length } )` )
137
+ if ( data . length > 2 * 1024 * 1024 ) {
138
+ console . log ( `skip ${ fileFullPath } (too large)` )
139
+ return ;
140
+ }
141
+ const compressResult = UglifyJS . minify ( data , {
136
142
output : {
137
143
comments : / ^ S O M E _ N O N E _ C O M M E N T S /
138
144
}
139
- } ) . code
145
+ } )
146
+ console . log ( `end ${ fileFullPath } ` )
147
+ const codeCompress = compressResult . code
140
148
if ( codeCompress ) {
141
149
console . log ( `saved ${ fileFullPath } (${ data . length } -> ${ codeCompress . length } )` ) ;
142
150
fs . writeFile ( fileFullPath , codeCompress , ( ) => {
143
151
} ) ;
152
+ } else {
153
+ console . log ( `failed ${ fileFullPath } ` )
144
154
}
145
155
} ) ;
146
156
} )
You can’t perform that action at this time.
0 commit comments