Omnira Docs v1.0.0

Commands

Run these in a terminal inside the source folder, after npm install (once).

CommandWhat it doesResult
npm run devBuilds everything, then rebuilds whenever you save a file in src/, and serves it at http://localhost:3000.dist/
npm run buildBuilds every demo and the overview page, with formatted HTML.dist/
npm run site -- <demo>Builds one demo as a finished website: pages at the top level, no demo or colour switcher.site/
npm run validateChecks the built HTML for mistakes (npm run validate -- <demo> for one demo).A report

Options for the build script#

You can also run the build script directly:

BASH
# only rebuild some demos (faster)
node build.js --only cafe,hotel

# skip formatting the HTML (faster while working)
node build.js --no-format

# use another port for the dev server
PORT=4000 npm run dev

On Windows PowerShell, set the port with $env:PORT=4000; npm run dev.

Where things end up#

  • dist/: every demo in its own folder, the overview index.html and assets/. Rebuilt by build and dev.
  • site/: one demo, ready to upload. Rebuilt by site.

Never edit files in dist/ or site/ directly when using the source files; they're overwritten on the next build. Edit src/ instead.