Move livereload to an external script and remove from express.
Developers have to use the livereload plugin in their web browser now.
This commit is contained in:
parent
9e379c835c
commit
cd0e4b1acf
|
@ -27,6 +27,7 @@
|
||||||
"clean:client:tsc": "scripty",
|
"clean:client:tsc": "scripty",
|
||||||
"clean:server:test": "scripty",
|
"clean:server:test": "scripty",
|
||||||
"watch:client": "SCRIPTY_PARALLEL=true scripty",
|
"watch:client": "SCRIPTY_PARALLEL=true scripty",
|
||||||
|
"watch:client:livereload": "scripty",
|
||||||
"watch:client:sass": "scripty",
|
"watch:client:sass": "scripty",
|
||||||
"watch:client:tsc": "scripty",
|
"watch:client:tsc": "scripty",
|
||||||
"danger:clean:server": "scripty",
|
"danger:clean:server": "scripty",
|
||||||
|
@ -45,7 +46,6 @@
|
||||||
"body-parser": "^1.12.4",
|
"body-parser": "^1.12.4",
|
||||||
"concurrently": "^2.0.0",
|
"concurrently": "^2.0.0",
|
||||||
"config": "^1.14.0",
|
"config": "^1.14.0",
|
||||||
"connect-livereload": "^0.5.3",
|
|
||||||
"debug": "^2.2.0",
|
"debug": "^2.2.0",
|
||||||
"dezalgo": "^1.0.3",
|
"dezalgo": "^1.0.3",
|
||||||
"electron-spawn": "https://github.com/Chocobozzz/electron-spawn",
|
"electron-spawn": "https://github.com/Chocobozzz/electron-spawn",
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^3.3.0",
|
"chai": "^3.3.0",
|
||||||
|
"livereload": "^0.4.1",
|
||||||
"mocha": "^2.3.3",
|
"mocha": "^2.3.3",
|
||||||
"node-livereload": "^0.6.0",
|
|
||||||
"node-sass": "^3.4.2",
|
"node-sass": "^3.4.2",
|
||||||
"scripty": "^1.5.0",
|
"scripty": "^1.5.0",
|
||||||
"standard": "^7.0.1",
|
"standard": "^7.0.1",
|
||||||
|
|
|
@ -2,6 +2,5 @@
|
||||||
|
|
||||||
npm run build
|
npm run build
|
||||||
NODE_ENV=test concurrently \
|
NODE_ENV=test concurrently \
|
||||||
"npm run livereload" \
|
|
||||||
"npm run watch:client" \
|
"npm run watch:client" \
|
||||||
"npm start"
|
"npm start"
|
||||||
|
|
3
scripts/watch/client/livereload.sh
Executable file
3
scripts/watch/client/livereload.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
livereload client/angular -e scss
|
|
@ -3,5 +3,5 @@
|
||||||
cd client || exit -1
|
cd client || exit -1
|
||||||
|
|
||||||
concurrently \
|
concurrently \
|
||||||
"node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css client/angular/**/ client/angular/**/**" \
|
"node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \
|
||||||
"node-sass -w angular/ --output angular/"
|
"node-sass -w angular/ --output angular/"
|
||||||
|
|
|
@ -56,11 +56,6 @@ app.use(expressValidator({
|
||||||
|
|
||||||
// ----------- Views, routes and static files -----------
|
// ----------- Views, routes and static files -----------
|
||||||
|
|
||||||
// Livereload
|
|
||||||
app.use(require('connect-livereload')({
|
|
||||||
port: 35729
|
|
||||||
}))
|
|
||||||
|
|
||||||
// Catch sefaults
|
// Catch sefaults
|
||||||
require('segfault-handler').registerHandler()
|
require('segfault-handler').registerHandler()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user