chore: add bun support #2254
@ -14,6 +14,7 @@ args.push("--secret");
|
||||
args.push(secret);
|
||||
|
||||
let buildproc, runproc;
|
||||
const spawnopts = { stdio: "inherit", shell: true };
|
||||
function run(changedFile) {
|
||||
if (changedFile) {
|
||||
console.log(`Change to ${changedFile} detected`);
|
||||
@ -28,10 +29,7 @@ function run(changedFile) {
|
||||
runproc = undefined;
|
||||
}
|
||||
|
||||
const thisbuildproc = spawn("npm", ["run", process.versions.bun ? "verify" : "build:dev"], {
|
||||
stdio: "inherit",
|
||||
shell: true
|
||||
});
|
||||
const thisbuildproc = spawn("npm", ["run", process.versions.bun ? "verify" : "build:dev"], spawnopts);
|
||||
const thisbuildstart = Date.now();
|
||||
buildproc = thisbuildproc;
|
||||
buildproc.on("exit", code => {
|
||||
@ -41,10 +39,7 @@ function run(changedFile) {
|
||||
buildproc = undefined;
|
||||
if (code === 0) {
|
||||
console.log(`${process.versions.bun ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`);
|
||||
runproc = spawn("npm", ["run", process.versions.bun ? "bun-run" : "start", "--", ...args], {
|
||||
stdio: "inherit",
|
||||
shell: true
|
||||
});
|
||||
runproc = spawn("npm", ["run", process.versions.bun ? "bun-run" : "start", "--", ...args], spawnopts);
|
||||
runproc.on("exit", () => {
|
||||
runproc = undefined;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user