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

Function buildWeb

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

Source from the content-addressed store, hash-verified

314// ---------------------------------------------------------------------------
315
316const buildWeb = async (mode: BuildMode) => {
317 const webDist = join(webRoot, "dist");
318 await rm(webDist, { recursive: true, force: true });
319
320 console.log(`Building web app (${mode})...`);
321 const proc = Bun.spawn(["bun", "run", "build", "--mode", mode], {
322 cwd: webRoot,
323 stdio: ["ignore", "inherit", "inherit"],
324 env: { ...process.env, NODE_ENV: mode },
325 });
326 if ((await proc.exited) !== 0) throw new Error("Web build failed");
327 return webDist;
328};
329
330// ---------------------------------------------------------------------------
331// 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