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

Function buildWeb

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

Source from the content-addressed store, hash-verified

288// ---------------------------------------------------------------------------
289
290const buildWeb = async (mode: BuildMode) => {
291 const webDist = join(webRoot, "dist");
292 await rm(webDist, { recursive: true, force: true });
293
294 console.log(`Building web app (${mode})...`);
295 const proc = Bun.spawn(["bun", "run", "build", "--mode", mode], {
296 cwd: webRoot,
297 stdio: ["ignore", "inherit", "inherit"],
298 env: { ...process.env, NODE_ENV: mode },
299 });
300 if ((await proc.exited) !== 0) throw new Error("Web build failed");
301 return webDist;
302};
303
304// ---------------------------------------------------------------------------
305// 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