dev.ts
| 1 | const server = Bun.spawn(["bun", "--watch", "src/index.tsx"], { stdio: ["inherit", "inherit", "inherit"] }); |
| 2 | const css = Bun.spawn(["bun", "scripts/build-css.ts", "--watch"], { stdio: ["inherit", "inherit", "inherit"] }); |
| 3 | |
| 4 | process.on("SIGINT", () => { |
| 5 | server.kill(); |
| 6 | css.kill(); |
| 7 | process.exit(0); |
| 8 | }); |
| 9 | |
| 10 | await Promise.all([server.exited, css.exited]); |
| 11 |