From 0da4c9d90d138ae41f4fdc2f377cd6efeea5a539 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Mon, 12 Dec 2016 16:28:31 +0200 Subject: [PATCH] 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 --- .gitignore | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0825b43..f44dfda 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ npm-debug.log /.idea/ .env build/ +.vscode/ diff --git a/package.json b/package.json index bcd8042..734bb6f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,9 @@ "typescript": "^2.0.3" }, "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", "test": "mocha --recursive ./lib", "build:docs": "jsdoc -c jsdoc.json", -- 2.39.5