资源分类,分类出音频

This commit is contained in:
AncTe committed 2023-06-09 22:59:20 +08:00
1 parent 820dc5bf4c
commit 80ce3b1a31
8 files changed
+101 -12

No files matched your search

+2 -1
View File
@@ -23,11 +23,12 @@ let totalSize = 0;
type Stats = fs.Stats & { name?: string };
export async function splitResorce(compress: boolean = false) {
await fs.ensureDir('./dist-resource');
await fs.emptyDir('./dist-resource');
const folder = await fs.stat('./dist');
totalSize = folder.size;
if (totalSize < MAX_SIZE) return;
await fs.ensureDir('./dist-resource');
await doSplit(compress);
}