mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-02 17:44:31 +08:00
资源压缩
This commit is contained in:
1 parent
7a196b5922
commit
7cc7fe375b
2 files changed
+13
-2
No files matched your search
+12
-1
@@ -178,9 +178,20 @@ const compress = !!Number(process.argv[4]);
|
||||
await splitResorce(compress);
|
||||
}
|
||||
|
||||
// 7. 压缩本体
|
||||
// 7. 压缩
|
||||
if (compress) {
|
||||
await fs.ensureDir('./out');
|
||||
await compressing.zip.compressDir('./dist', './out/dist.zip');
|
||||
|
||||
// 压缩资源
|
||||
if (resorce) {
|
||||
const resources = await fs.readdir('./dist-resource');
|
||||
for await (const index of resources) {
|
||||
await compressing.zip.compressDir(
|
||||
`./dist-resource/${index}`,
|
||||
`./out/${index}.zip`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user