update build.ts

This commit is contained in:
2026-02-09 01:37:38 +08:00
parent 6291a796dc
commit 1d24822def
2 changed files with 16 additions and 10 deletions

View File

@@ -18,12 +18,12 @@
},
"build.ts": {
"script_name": "build.ts",
"script_length": 5400,
"script_sha256": "1158e454d822811442c9b5ea3a0f41ffe8944b8e317fe26972f13ed50bd6d053",
"script_length": 5493,
"script_sha256": "387d0f3810e419001e97ce591803c5878a5226fb097a9acbdec2a006892d17dc",
"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": 1770572059688
"update_time": 1770572253823
},
"cal-bun.ts": {
"script_name": "cal-bun.ts",

View File

@@ -10,8 +10,16 @@ import {
uint8ArrayToHexString,
writeStringToFile,
} from "https://script.hatter.ink/@36/deno-commons-mod.ts";
import {parseArgs} from "jsr:@std/cli/parse-args";
import {readFileToString} from "https://global.hatter.ink/script/get/@1/deno-commons-1.6.0-mod.ts";
import { parseArgs } from "jsr:@std/cli/parse-args";
import { readFileToString } from "https://global.hatter.ink/script/get/@1/deno-commons-1.6.0-mod.ts";
function handleHelp() {
console.log(term.auto(`Build scripts to bundle and sign.
Usage:
[blue][bold]build.ts[//] --help
[blue][bold]build.ts[//] [-M|--no-min] [-S|--skip-sign] [-F|--force] [bold]FILES[/]`));
}
async function main() {
const flags = parseArgs(Deno.args, {
@@ -30,9 +38,7 @@ async function main() {
});
if (flags.help) {
console.log(term.auto(`Usage:
[blue][bold]build.ts[//] --help
[blue][bold]build.ts[//] [-M|--no-min] [-S|--skip-sign] [-F|--force] FILES`));
handleHelp();
return;
}
@@ -173,5 +179,5 @@ async function buildFile(file: string, flags: any) {
await main();
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260209T013352+08:00.MEUCIA0Da37Cvdu6PzvaGWZK
// fpW41+0S0tfBfvkpJOFvB1h+AiEAvS1FYGxqEwZThHHZqx/Zju1z8m9D3P4p9EfxojfmDjo=
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260209T013705+08:00.MEQCIHj/WaoXLvfRd2r4TEZ7
// neD2hxP6eE9v6bh+wAlNR80bAiBLEqdh5PQC+augiA26bFokQMY6/+Nah4UwgLM00Z6hpg==