From aaa96c4a09c30a0fbbee9579d56573445daf68e2 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Sun, 18 Jan 2026 06:04:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=A4=9A=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC=E5=B9=B6=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=9E=84=E5=BB=BA=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加构建脚本以针对多个平台编译服务器输出文件并打印构建结果 --- build.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 build.ts diff --git a/build.ts b/build.ts new file mode 100644 index 0000000..92d2f8b --- /dev/null +++ b/build.ts @@ -0,0 +1,23 @@ +const targets = [ + 'bun-windows-x64', + 'bun-darwin-arm64', + 'bun-linux-x64', +] as const + +const outputs = await Promise.all( + targets.map((target) => + Bun.build({ + entrypoints: ['./.output/server/index.mjs'], + compile: { + outfile: `server-${target}`, + target, + }, + outdir: './out', + }), + ), +) + +for (const [index, output] of outputs.entries()) { + console.log(`\n${targets[index]}:`) + console.log(output.outputs) +}