modify scripts and readme

This commit is contained in:
Connor Turland 2018-03-11 18:33:36 -04:00
parent 065c1fae03
commit 1e145c8d98
3 changed files with 12 additions and 6 deletions

2
.gitignore vendored
View file

@ -6,7 +6,7 @@
#assety stuff #assety stuff
public/css public/css
vendor/ public/metamaps.bundle.js
node_modules node_modules
npm-debug.log npm-debug.log

View file

@ -19,10 +19,10 @@ Start up the nodejs server which serves the UI files, the socketio realtime serv
$ npm start $ npm start
``` ```
Build the css. If you're developing and writing css, make sure that it will rebuild the css when you make changes, by running the `node-sass` process with the `-w` flag. Build the css. If you're developing and writing css, make sure that it will rebuild the css when you make changes, by running the `npm sass:watch` process and leaving it running.
``` ```
$ node-sass sass/application.scss public/css/application.css # to run it once $ npm run sass # to build the css once
$ node-sass -w sass/application.scss public/css/application.css # to watch it for more changes $ npm run sass:watch # to watch it for more changes
``` ```
Run the metamaps api in another terminal, on whichever port you configured in your .env file. Run the metamaps api in another terminal, on whichever port you configured in your .env file.
@ -86,4 +86,7 @@ use the forever node package.
``` ```
$ npm install -g forever $ npm install -g forever
$ forever start server.js $ forever start server.js
``` ```
To build the javascript file
`$ npm run build`

View file

@ -5,9 +5,12 @@
"scripts": { "scripts": {
"start": "node server.js", "start": "node server.js",
"build": "webpack", "build": "webpack",
"sass": "node-sass sass/application.scss public/css/application.css",
"sass:watch": "node-sass -w sass/application.scss public/css/application.css",
"test": "mocha-webpack --webpack-config webpack.test.config.js --require test_support/dom.js --recursive test", "test": "mocha-webpack --webpack-config webpack.test.config.js --require test_support/dom.js --recursive test",
"eslint": "eslint src", "eslint": "eslint src",
"eslint:fix": "eslint --fix src" "eslint:fix": "eslint --fix src",
"postinstall": "[ \"$NODE_ENV\" === production ] && npm build && npm run sass"
}, },
"repository": { "repository": {
"type": "git", "type": "git",