Skip to content

Commit 6db684a

Browse files
author
server
committed
$feat: release 5.9.0
1 parent 9b22898 commit 6db684a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

app/Constant/AppConstant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

vendor/modstart/modstart/resources/asset/src/mod/webpack.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff 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: /^SOME_NONE_COMMENTS/
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
})

0 commit comments

Comments
 (0)