MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / buildWeb

Function buildWeb

apps/cli/src/build.ts:364–376  ·  view source on GitHub ↗
(mode: BuildMode)

Source from the content-addressed store, hash-verified

362// ---------------------------------------------------------------------------
363
364const buildWeb = async (mode: BuildMode) => {
365 const webDist = join(webRoot, "dist");
366 await rm(webDist, { recursive: true, force: true });
367
368 console.log(`Building web app (${mode})...`);
369 const proc = Bun.spawn(["bun", "run", "build", "--mode", mode], {
370 cwd: webRoot,
371 stdio: ["ignore", "inherit", "inherit"],
372 env: { ...process.env, NODE_ENV: mode },
373 });
374 if ((await proc.exited) !== 0) throw new Error("Web build failed");
375 return webDist;
376};
377
378// ---------------------------------------------------------------------------
379// Embedded web UI — generates a virtual module that imports all web assets

Callers 1

Calls 1

logMethod · 0.80

Tested by

no test coverage detected