mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-06-28 21:27:59 +08:00
fix: build
This commit is contained in:
parent
afe7fc3334
commit
6b4833ef4d
@ -177,18 +177,7 @@ const compress = type === 'dist';
|
|||||||
if (compress) {
|
if (compress) {
|
||||||
try {
|
try {
|
||||||
await fs.ensureDir('./out');
|
await fs.ensureDir('./out');
|
||||||
await compressing.zip.compressDir('./dist', './out/dist.zip');
|
await compressing.zip.compressDir('./dist', './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`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('压缩为zip失败!');
|
console.log('压缩为zip失败!');
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user