Generate CSS from a package.json script — the canonical v2 setup.
Setup#
package.json
{
"scripts": {
"css": "node build.mjs",
"watch": "node --watch build.mjs"
}
}Workflow#
- Edit your theme/config
- Re-run generation (
npm run css) - Refresh the browser
Note. v2 has no watch mode — the v3 CLI added
nakshora dev with incremental rebuilds.