Improve the package.json scripts

1. Include a `prestart` script, which runs the build
2. Make the `start` script just start the demo server
3. Add a new `dev` script, which contains the nodemon logic
4. nodemon now watches for changes in `*.ts` files and runs the start command

Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
This commit is contained in:
Antonis Kalipetis 2016-12-12 16:28:31 +02:00
parent df83298c54
commit 0da4c9d90d
No known key found for this signature in database
GPG Key ID: 15691170DA0396BB
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ npm-debug.log
/.idea/ /.idea/
.env .env
build/ build/
.vscode/

View File

@ -52,7 +52,9 @@
"typescript": "^2.0.3" "typescript": "^2.0.3"
}, },
"scripts": { "scripts": {
"start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'", "prestart": "npm run build",
"start": "node demo/app",
"dev": "nodemon -e js,ts --watch src --watch demo --exec npm start",
"lint": "tslint src/**/*.ts", "lint": "tslint src/**/*.ts",
"test": "mocha --recursive ./lib", "test": "mocha --recursive ./lib",
"build:docs": "jsdoc -c jsdoc.json", "build:docs": "jsdoc -c jsdoc.json",