From addb60e96510ca0af6f34e07892551e1596fe9a7 Mon Sep 17 00:00:00 2001 From: John Furrow Date: Mon, 15 Aug 2016 21:52:07 -0700 Subject: [PATCH] Update npm scripts --- README.md | 6 ++++-- package.json | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d1446d2b..1fcc6a63 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,10 @@ If you have a specific issue or bug, please file a Github issue. If you want to #### Updating 1. To update, run `git pull` in this repository's directory. 2. Check `config.template.js` for configuration changes that you may wish to incoporate in your `config.js`. -3. Kill the running Node server and restart it with `npm start`. - * The `start` script removes old dependencies, installs new ones, transpiles JavaScript and CSS, and starts the web server. +3. Kill the running Node server. +4. Run `npm install` to update dependencies. +5. Restart it with `npm start`. + * Static frontend assets are transpiled and compressed before starting the server. #### Tips * I run the web server with `screen` to keep the web server running independently of the terminal session. diff --git a/package.json b/package.json index bbfea604..3141dbf9 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,11 @@ "version": "0.0.0", "private": true, "scripts": { - "livereload": "NODE_ENV='development' ./node_modules/.bin/gulp livereload", - "start": "npm prune && npm install && ./node_modules/.bin/gulp dist && ./node_modules/.bin/nodemon ./server/bin/www" + "preinstall": "npm prune", + "prestart": "./node_modules/.bin/gulp dist", + "start": "./node_modules/.bin/nodemon ./server/bin/www", + "start:production": "node ./server/bin/www", + "livereload": "NODE_ENV='development' ./node_modules/.bin/gulp livereload" }, "dependencies": { "axios": "^0.12.0",