npm run site:add my-new-siteRegister a new site called "my-new-site", and scaffolds the default site structure and a demo website in a dedicated folder : src/sites/my-new-site/.
ℹ️ To remove a site just delete the corresponding folder in src/sites/
- If a website with the same name have already been created, the operation will fail
- Site names are expected to be kebab-case and only alphanumerical, non allowed formats will be refused
| Site Name | |
|---|---|
| my-site-name | ✅ Ok |
| site2 | ✅ Ok |
| -my-site-name | 🚫 Cannot start or end with '-' |
| my@-site-name | 🚫 Can only include alphanumerical characters and "-" |
| my--site-name | 🚫 Cannot have multiple consecutive "-" |
This operation compiles ts code and optimises assets for production.
npm run site:build my-new-siteBuilds and bundles the ressources only for the site called my-new-site
npm run site:build-allBuilds and bundles the ressources for all registered sites
npm run site:clean-outdirDeletes the content of the sites outdir (root dist/ dir)
ℹ️ see server config
npm run server:devWill serve the lastest versions of your pages and assets directly from the src folder, with hot module replacement.
npm run server:previewWill serve pages and bundled assets from the dist folder.
ℹ️ It behaves exactly like the production server, the only difference is that it will accept to serve static assets.
ℹ️ For the preview server to work, the lastest ressources of the targetted site must have been built (using the site:build or site:build-all command)
npm run serverWill serve pages from the dist folder, but does not handle static file requests: see serving static assets in production
ℹ️ For the production server to work, the lastest ressources of the targetted site must have been built (using the site:build or site:build-all command)
npm run core:buildThis operation compiles the core scripts of Paon (server, cli scripts etc..) into JavaScript.
npm run core:clean-outdirThis operation will delete all the core compiled scripts of Paon (server, cli scripts etc..).
You need to run npm run core:build to compile them again.
npm run core:testRuns tests
npm run site:add helpCalling some commands with a help argument will display a short manual directly in the console.
| Command | Accepts help arg |
|---|---|
site:add |
✅ |
site:build |
✅ |
site:build-all |
✅ |
site:clean-outdir |
✅ |
server:dev |
🚫 |
server:preview |
🚫 |
server |
🚫 |
core:clean-outdir |
✅ |
core:build |
🚫 |
core:test |
🚫 |