update build.ts

This commit is contained in:
2026-02-09 00:59:35 +08:00
parent 4d4700d7de
commit 5813346f73
2 changed files with 12 additions and 8 deletions

View File

@@ -42,11 +42,15 @@ async function main() {
}
flags.min = !flags["no-min"];
const filesCount = flags._.length;
const files: string[] = flags._.filter((f) => {
return f.endsWith(".ts") && !f.includes(".bundle.");
});
const filesCount = files.length;
log.info(`Total ${filesCount} file(s)`);
for (let i = 0; i < filesCount; i++) {
const file = flags._[i];
if (file.includes(".bundle.")) {
const file = files[i];
if (file.includes(".bundle.") || !file.endsWith(".ts")) {
log.warn(`Skip bundle file: ${file} #${i + 1} of ${filesCount}`);
continue;
}
@@ -160,5 +164,5 @@ async function buildFile(file: string, flags: any) {
await main();
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260209T005219+08:00.MEUCIDo3pPzkGK7FiGyuEOOr
// evz4jRLWSy5vuqZ1FynulxpkAiEAhGVuwgCzBTzwPSpV4r8aEQFJ6sjd/pZrRq3eUoG9DbE=
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260209T005851+08:00.MEQCIDd33gREmm1CEKO83ZBC
// B3iYNDB5hcaPuiUyH5TGR7VBAiBsxkw+GcD0fPpxTj2Yi43VFx/6YAT8L5HA7p9VEZwxdA==