Add convenience scripts for development
Add watch-ts, watch-site and serve scripts as convenient shortcuts for running the development services.
This commit is contained in:
parent
aecc648fdd
commit
8a1313eb6e
2 changed files with 15 additions and 0 deletions
12
Readme.md
12
Readme.md
|
@ -1,3 +1,15 @@
|
||||||
# hornwitser.no
|
# hornwitser.no
|
||||||
|
|
||||||
The code behind hornwitser.no
|
The code behind hornwitser.no
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
For regular development run:
|
||||||
|
- `pnpm watch-ts` to transpile the TypeScript code to build/node and watch for changes.
|
||||||
|
- `pnpm watch-site` to host the site on http://localhost:8080 and reload the server on changes.
|
||||||
|
- `pnpm test` to run the tests and report coverage.
|
||||||
|
|
||||||
|
Other scripts available are:
|
||||||
|
- `pnpm prepare` to transpile the TypeScript code to build/node
|
||||||
|
- `pnpm build` to build the static resources to build/web.
|
||||||
|
- `pnpm serve` to host the website on http://localhost:8080
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
"main": "build/node/index.js",
|
"main": "build/node/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc",
|
"prepare": "tsc",
|
||||||
|
"watch-ts": "tsc --watch",
|
||||||
|
"watch-site": "node --enable-source-maps build/node/cli.js watch",
|
||||||
"build": "node --enable-source-maps build/node/cli.js build",
|
"build": "node --enable-source-maps build/node/cli.js build",
|
||||||
|
"serve": "node --enable-source-maps build/node/cli.js serve",
|
||||||
"test": "node --test --enable-source-maps --experimental-test-coverage"
|
"test": "node --test --enable-source-maps --experimental-test-coverage"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue