Build and Watch
Boss CSS ships npx boss-css build and npx boss-css watch for projects that are not using PostCSS. Stencil projects should use this flow.
Build
npx boss-css build
npx boss-css build:
- Reads
contentglobs from.bo$$/config.js(orbo$$inpackage.json). - Parses files with your configured plugins.
- Writes runtime output to
folder(defaults toconfigDir), unlessclassname-onlyis selected. - Writes CSS to
stylesheetPathand any*.boss.cssboundary files unlessruntime.only = true.- See CSS Boundaries for directory scoping and hoisting details.
Watch
npx boss-css watch
npx boss-css watch runs npx boss-css build once and rebuilds on file changes.
- Uses
@parcel/watcherfor fast file events. - Ignores common output folders (
node_modules,.git,dist) and the Boss output directory to avoid loops. - Boundary files are treated as outputs and are ignored after each build so they do not trigger rebuild loops.
Requirements
contentmust be configured in.bo$$/config.js(orbo$$inpackage.json).