Build
Compile and stage the app for development. Processes frontend HTML/CSS/TS and compiles the backend into build/.
Purpose
- Produce up-to-date dev outputs without optimization.
- Validate the workspace and surface actionable errors.
When To Use
- Before running tests locally.
- In CI to check that code compiles.
CLI
webstir build [--clean] [--runtime <frontend|backend|all>]
Steps
- Validate workspace structure and required inputs.
- Compile TypeScript for frontend/backend using
tsc --buildwith the embedded base config. - Bundle JavaScript with esbuild for fast, development-friendly output with source maps.
- Process CSS imports and copy assets.
- Merge page HTML into
src/frontend/app/app.htmland write tobuild/frontend/pages/<page>/index.html. - Copy Images, Fonts, and Media to
build/frontend/{images|fonts|media}/**. - Copy app assets to
build/frontend/app/.
Outputs
build/frontend/**with readable assets and page HTML (includesbuild/frontend/{images|fonts|media}/**).build/backend/index.jscompiled backend entry..webstir/backend-manifest.json— inspect it without startingwatchviawebstir backend-inspect.
Flags
--clean: remove previousbuild/**before building.--runtime/-r: limit work tofrontend,backend, orall(default). The CLI auto-detects which folders exist, but forcing a scope speeds up backend-only loops or frontend-only sandboxes.
Examples:
webstir build --runtime backend— skip frontend pipelines when touching APIs or jobs.webstir build --runtime frontend --clean— refresh only the UI surface after deletingbuild/.
Errors & Exit Codes
- Non-zero on TypeScript errors, missing base HTML, or pipeline failures.
- Logs identify the failing stage and file when possible.