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
66{
77 const APP = 'blog ' ;
88 const APP_NAME = 'ModStartBlog ' ;
9- const VERSION = '5.8 .0 ' ;
9+ const VERSION = '5.9 .0 ' ;
1010}
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ module.exports = function (dirname) {
6464 }
6565
6666 let cleanFilesCommands = [ ]
67+ console . log ( "remove old files" )
6768 switch ( config . platform ) {
6869 case 'windows' :
6970 cleanFilesCommands . push ( files . length > 0 ? 'del /F ' + files . join ( ' ' ) : 'cd' )
@@ -132,15 +133,24 @@ module.exports = function (dirname) {
132133 console . error ( err ) ;
133134 return ;
134135 }
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 , {
136142 output : {
137143 comments : / ^ S O M E _ N O N E _ C O M M E N T S /
138144 }
139- } ) . code
145+ } )
146+ console . log ( `end ${ fileFullPath } ` )
147+ const codeCompress = compressResult . code
140148 if ( codeCompress ) {
141149 console . log ( `saved ${ fileFullPath } (${ data . length } -> ${ codeCompress . length } )` ) ;
142150 fs . writeFile ( fileFullPath , codeCompress , ( ) => {
143151 } ) ;
152+ } else {
153+ console . log ( `failed ${ fileFullPath } ` )
144154 }
145155 } ) ;
146156 } )
You can’t perform that action at this time.
0 commit comments