XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

chore: use bun instead of npm when running dev script under bun (#2946)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2946 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

654652b8
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +6 -3
Modified package.json +0 -1
@@ -10,7 +10,6 @@
10 10 "build:dev": "tsgo --inlineSourceMap",
11 11 "build:dev:tsc": "tsc --incremental --inlineSourceMap",
12 12 "build-and-start": "npm run build && npm run start",
13 "build-and-start:bun": "npm run verify && npm run bun-run",
14 13 "dev": "node scripts/dev.cjs",
15 14 "dev:bun": "bun scripts/dev.cjs",
16 15 "verify": "tsgo --noEmit",
Modified scripts/dev.cjs +6 -2
@@ -40,7 +40,11 @@ function run(changedFile) {
40 40 runproc = undefined;
41 41 }
42 42
43 const thisbuildproc = spawn("npm", ["run", cangoraw ? "verify" : "build:dev"], spawnopts);
43 const thisbuildproc = spawn(
44 process.versions.bun ? "bun" : "npm",
45 ["run", cangoraw ? "verify" : "build:dev"],
46 spawnopts
47 );
44 48 const thisbuildstart = Date.now();
45 49 buildproc = thisbuildproc;
46 50 buildproc.on("exit", code => {
@@ -51,7 +55,7 @@ function run(changedFile) {
51 55 if (code === 0) {
52 56 console.log(`${cangoraw ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`);
53 57 runproc = spawn(
54 "npm",
58 process.versions.bun ? "bun" : "npm",
55 59 ["run", cangoraw ? (process.versions.bun ? "raw:bun" : "raw") : "start", "--", ...args],
56 60 spawnopts
57 61 );