From 0da4c9d90d138ae41f4fdc2f377cd6efeea5a539 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Mon, 12 Dec 2016 16:28:31 +0200 Subject: [PATCH 1/2] 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 0825b43a..f44dfda2 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 bcd8042a..734bb6fb 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", From f00ea4bfac27cb332d9c6c1ce9df322e6c86c8e5 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Thu, 15 Dec 2016 13:36:21 +0200 Subject: [PATCH 2/2] Add a Procfile with the `npm start` command Also, update the Procfile.dev with the updated `npm run dev` command. Signed-off-by: Antonis Kalipetis --- Procfile | 1 + Procfile.dev | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 00000000..063b78f4 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: npm start diff --git a/Procfile.dev b/Procfile.dev index 063b78f4..8d2c5445 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1 +1 @@ -web: npm start +web: npm run dev