diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-21 15:21:15 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-21 15:21:15 +0200 |
commit | cd0e4b1acfbd4cc393f6cfcab718d66e25193fbd (patch) | |
tree | f34d2642d33dd6fd8e864b101db13906d146f346 | |
parent | 9e379c835c2badfe8e9088e25870af0a6a8c4d40 (diff) | |
download | PeerTube-cd0e4b1acfbd4cc393f6cfcab718d66e25193fbd.tar.gz PeerTube-cd0e4b1acfbd4cc393f6cfcab718d66e25193fbd.tar.zst PeerTube-cd0e4b1acfbd4cc393f6cfcab718d66e25193fbd.zip |
Move livereload to an external script and remove from express.
Developers have to use the livereload plugin in their web browser now.
-rw-r--r-- | package.json | 4 | ||||
-rwxr-xr-x | scripts/dev.sh | 1 | ||||
-rwxr-xr-x | scripts/watch/client/livereload.sh | 3 | ||||
-rwxr-xr-x | scripts/watch/client/sass.sh | 2 | ||||
-rw-r--r-- | server.js | 5 |
5 files changed, 6 insertions, 9 deletions
diff --git a/package.json b/package.json index f72aec9f0..a6c4d0e57 100644 --- a/package.json +++ b/package.json | |||
@@ -27,6 +27,7 @@ | |||
27 | "clean:client:tsc": "scripty", | 27 | "clean:client:tsc": "scripty", |
28 | "clean:server:test": "scripty", | 28 | "clean:server:test": "scripty", |
29 | "watch:client": "SCRIPTY_PARALLEL=true scripty", | 29 | "watch:client": "SCRIPTY_PARALLEL=true scripty", |
30 | "watch:client:livereload": "scripty", | ||
30 | "watch:client:sass": "scripty", | 31 | "watch:client:sass": "scripty", |
31 | "watch:client:tsc": "scripty", | 32 | "watch:client:tsc": "scripty", |
32 | "danger:clean:server": "scripty", | 33 | "danger:clean:server": "scripty", |
@@ -45,7 +46,6 @@ | |||
45 | "body-parser": "^1.12.4", | 46 | "body-parser": "^1.12.4", |
46 | "concurrently": "^2.0.0", | 47 | "concurrently": "^2.0.0", |
47 | "config": "^1.14.0", | 48 | "config": "^1.14.0", |
48 | "connect-livereload": "^0.5.3", | ||
49 | "debug": "^2.2.0", | 49 | "debug": "^2.2.0", |
50 | "dezalgo": "^1.0.3", | 50 | "dezalgo": "^1.0.3", |
51 | "electron-spawn": "https://github.com/Chocobozzz/electron-spawn", | 51 | "electron-spawn": "https://github.com/Chocobozzz/electron-spawn", |
@@ -73,8 +73,8 @@ | |||
73 | }, | 73 | }, |
74 | "devDependencies": { | 74 | "devDependencies": { |
75 | "chai": "^3.3.0", | 75 | "chai": "^3.3.0", |
76 | "livereload": "^0.4.1", | ||
76 | "mocha": "^2.3.3", | 77 | "mocha": "^2.3.3", |
77 | "node-livereload": "^0.6.0", | ||
78 | "node-sass": "^3.4.2", | 78 | "node-sass": "^3.4.2", |
79 | "scripty": "^1.5.0", | 79 | "scripty": "^1.5.0", |
80 | "standard": "^7.0.1", | 80 | "standard": "^7.0.1", |
diff --git a/scripts/dev.sh b/scripts/dev.sh index d617cd511..ddb5b8d33 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh | |||
@@ -2,6 +2,5 @@ | |||
2 | 2 | ||
3 | npm run build | 3 | npm run build |
4 | NODE_ENV=test concurrently \ | 4 | NODE_ENV=test concurrently \ |
5 | "npm run livereload" \ | ||
6 | "npm run watch:client" \ | 5 | "npm run watch:client" \ |
7 | "npm start" | 6 | "npm start" |
diff --git a/scripts/watch/client/livereload.sh b/scripts/watch/client/livereload.sh new file mode 100755 index 000000000..a4acc439c --- /dev/null +++ b/scripts/watch/client/livereload.sh | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | livereload client/angular -e scss | ||
diff --git a/scripts/watch/client/sass.sh b/scripts/watch/client/sass.sh index 7d716cb7c..22c536e38 100755 --- a/scripts/watch/client/sass.sh +++ b/scripts/watch/client/sass.sh | |||
@@ -3,5 +3,5 @@ | |||
3 | cd client || exit -1 | 3 | cd client || exit -1 |
4 | 4 | ||
5 | concurrently \ | 5 | concurrently \ |
6 | "node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css client/angular/**/ client/angular/**/**" \ | 6 | "node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \ |
7 | "node-sass -w angular/ --output angular/" | 7 | "node-sass -w angular/ --output angular/" |
@@ -56,11 +56,6 @@ app.use(expressValidator({ | |||
56 | 56 | ||
57 | // ----------- Views, routes and static files ----------- | 57 | // ----------- Views, routes and static files ----------- |
58 | 58 | ||
59 | // Livereload | ||
60 | app.use(require('connect-livereload')({ | ||
61 | port: 35729 | ||
62 | })) | ||
63 | |||
64 | // Catch sefaults | 59 | // Catch sefaults |
65 | require('segfault-handler').registerHandler() | 60 | require('segfault-handler').registerHandler() |
66 | 61 | ||