mirror of
https://github.com/vector-im/element-web.git
synced 2026-04-04 13:11:25 +02:00
21 lines
576 B
JavaScript
21 lines
576 B
JavaScript
import { spawn } from "node:child_process";
|
|
|
|
import { findSinglePackageByScript, repoRoot } from "./workspace-utils.mjs";
|
|
|
|
const storybookPackage = findSinglePackageByScript("storybook");
|
|
|
|
console.log(`Starting Storybook from ${storybookPackage.name} (${storybookPackage.relativeDir}).`);
|
|
|
|
const child = spawn("pnpm", ["--filter", storybookPackage.name, "run", "storybook"], {
|
|
cwd: repoRoot,
|
|
stdio: "inherit",
|
|
});
|
|
|
|
child.on("exit", (code, signal) => {
|
|
if (signal) {
|
|
process.kill(process.pid, signal);
|
|
return;
|
|
}
|
|
|
|
process.exit(code ?? 0);
|
|
}); |