(cmd, args, label)
| 9 | process.chdir(root); |
| 10 | |
| 11 | function run(cmd, args, label) { |
| 12 | const result = spawnSync(cmd, args, { |
| 13 | stdio: "inherit", |
| 14 | shell: process.platform === "win32", |
| 15 | }); |
| 16 | if (result.status !== 0) { |
| 17 | console.error(`[${label}] failed with status ${result.status}`); |
| 18 | process.exit(result.status ?? 1); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | rmSync("build", { recursive: true, force: true }); |
| 23 |