@bomb.sh/tools
Version:
The internal dev, build, and lint CLI for Bombshell projects
32 lines (30 loc) • 763 B
JavaScript
import { x } from "tinyexec";
//#region src/commands/dev.ts
async function dev(ctx) {
const { args } = ctx;
const [file = "./src/index.ts", ...rest] = args;
console.log(`node --experimental-transform-types --disable-warning=ExperimentalWarning ${args.join(" ")}`);
const stdio = x("node", [
"--experimental-transform-types",
"--no-warnings",
"--watch-path=./src/",
file,
...rest
]);
console.log("Starting dev server...");
console.log("Press Ctrl+C to stop the server.");
for await (const line of stdio) {
if (line.startsWith("Restarting")) {
console.log(line);
continue;
}
if (line.startsWith("Completed")) {
console.log();
continue;
}
console.log(line);
}
}
//#endregion
export { dev };
//# sourceMappingURL=dev.mjs.map