[READ-ONLY] Mirror of https://github.com/bombshell-dev/tools. Internal CLI to standardize tooling across all Bombshell projects
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334import { x } from "tinyexec";import type { CommandContext } from "../context.ts";
// standardized `dev` command, shells out to `node --strip-types`export async function dev(ctx: CommandContext) { const { args } = ctx; const [file = "./src/index.ts", ...rest] = args; // console.clear(); 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); }}