You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
522 B
JavaScript
21 lines
522 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { exec } from "node:child_process";
|
|
import { resolve } from "node:path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const process = exec(
|
|
"npm run start",
|
|
{ cwd: resolve(fileURLToPath(import.meta.url), "..") },
|
|
(error, stdout, stderr) => {
|
|
if (error) {
|
|
console.error(`${error}`);
|
|
return;
|
|
}
|
|
console.log(`${stdout}`);
|
|
console.error(`${stderr}`);
|
|
}
|
|
);
|
|
process.stdout.on("data", (data) => console.log(data));
|
|
process.stderr.on("data", (data) => console.error(data));
|