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

@@ -18,12 +18,12 @@
},
"build.ts": {
"script_name": "build.ts",
"script_length": 4878,
"script_sha256": "d7df641b6e4fe1e3618d951c50303b4ca2c83d7ec3a8d30a25d1555562c0d71d",
"script_length": 5021,
"script_sha256": "0360ac3b4be39b9a9d1c41504dda460606603513320832689aba36fa726e3bbf",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/build.ts",
"single_script_file": true,
"publish_time": 1770564482429,
"update_time": 1770569587837
"update_time": 1770569970701
},
"cal-bun.ts": {
"script_name": "cal-bun.ts",

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==