diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-03 22:34:39 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-03 22:34:39 +0200 |
commit | fc76359be11956f8514fc0dda1f66bb1c3397d26 (patch) | |
tree | 4d80142778971f1d9e09606e8f8745d56cee8507 /scripts | |
parent | 4a6995be18b15de1834a39c8921a0e4109671bb6 (diff) | |
download | PeerTube-fc76359be11956f8514fc0dda1f66bb1c3397d26.tar.gz PeerTube-fc76359be11956f8514fc0dda1f66bb1c3397d26.tar.zst PeerTube-fc76359be11956f8514fc0dda1f66bb1c3397d26.zip |
Adapt npm scripts
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/client/dev.sh | 5 | ||||
-rwxr-xr-x | scripts/build/client/sass.sh | 9 | ||||
-rwxr-xr-x | scripts/build/client/tsc.sh | 5 | ||||
-rwxr-xr-x | scripts/clean/client/dist.sh (renamed from scripts/watch/client/tsc.sh) | 3 | ||||
-rwxr-xr-x | scripts/clean/client/sass.sh | 5 | ||||
-rwxr-xr-x | scripts/clean/client/tsc.sh | 6 | ||||
-rwxr-xr-x | scripts/dev.sh | 1 | ||||
-rwxr-xr-x | scripts/help.sh | 14 | ||||
-rwxr-xr-x | scripts/watch/client/livereload.sh | 2 | ||||
-rwxr-xr-x | scripts/watch/client/sass.sh | 7 | ||||
-rwxr-xr-x | scripts/watch/client/webpack.sh | 5 |
11 files changed, 16 insertions, 46 deletions
diff --git a/scripts/build/client/dev.sh b/scripts/build/client/dev.sh new file mode 100755 index 000000000..b75b72f12 --- /dev/null +++ b/scripts/build/client/dev.sh | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | |||
5 | npm run webpack -- --config config/webpack.dev.js --progress --profile --colors --display-error-details --display-cached | ||
diff --git a/scripts/build/client/sass.sh b/scripts/build/client/sass.sh deleted file mode 100755 index d8dfedca3..000000000 --- a/scripts/build/client/sass.sh +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | npm run clean:client:sass | ||
4 | cd client || exit -1 | ||
5 | |||
6 | # Compile index and angular files | ||
7 | concurrently \ | ||
8 | "node-sass --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \ | ||
9 | "node-sass app/ --output app/" | ||
diff --git a/scripts/build/client/tsc.sh b/scripts/build/client/tsc.sh deleted file mode 100755 index cca1643d4..000000000 --- a/scripts/build/client/tsc.sh +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | node systemjs.bundle.js | ||
5 | npm run tsc | ||
diff --git a/scripts/watch/client/tsc.sh b/scripts/clean/client/dist.sh index f00656d2e..2cbbf90dc 100755 --- a/scripts/watch/client/tsc.sh +++ b/scripts/clean/client/dist.sh | |||
@@ -1,5 +1,4 @@ | |||
1 | #!/usr/bin/env sh | 1 | #!/usr/bin/env sh |
2 | 2 | ||
3 | cd client || exit -1 | 3 | cd client || exit -1 |
4 | 4 | rm -rf dist/ | |
5 | npm run tsc:w | ||
diff --git a/scripts/clean/client/sass.sh b/scripts/clean/client/sass.sh deleted file mode 100755 index 04d239ffc..000000000 --- a/scripts/clean/client/sass.sh +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | rm -f stylesheets/index.css | ||
5 | find app -regextype posix-egrep -regex ".*\.(css)$" -exec rm -f {} \; | ||
diff --git a/scripts/clean/client/tsc.sh b/scripts/clean/client/tsc.sh deleted file mode 100755 index b17888640..000000000 --- a/scripts/clean/client/tsc.sh +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | find app -regextype posix-egrep -regex ".*\.(js|map)$" -exec rm -f {} \; | ||
5 | rm -rf ./bundles | ||
6 | rm -f main.js main.js.map | ||
diff --git a/scripts/dev.sh b/scripts/dev.sh index ddb5b8d33..e792c1448 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh | |||
@@ -1,6 +1,5 @@ | |||
1 | #!/usr/bin/env sh | 1 | #!/usr/bin/env sh |
2 | 2 | ||
3 | npm run build | ||
4 | NODE_ENV=test concurrently \ | 3 | NODE_ENV=test concurrently \ |
5 | "npm run watch:client" \ | 4 | "npm run watch:client" \ |
6 | "npm start" | 5 | "npm start" |
diff --git a/scripts/help.sh b/scripts/help.sh index 3ed9f15cc..a2c8e4df0 100755 --- a/scripts/help.sh +++ b/scripts/help.sh | |||
@@ -2,23 +2,17 @@ | |||
2 | 2 | ||
3 | printf "############# PeerTube help #############\n\n" | 3 | printf "############# PeerTube help #############\n\n" |
4 | printf "npm run ...\n" | 4 | printf "npm run ...\n" |
5 | printf " build -> Build the application\n" | 5 | printf " build -> Build the application for production (alias of build:client:prod)\n" |
6 | printf " build:client -> Build the client (css, js files)\n" | 6 | printf " build:client:dev -> Build the client for development\n" |
7 | printf " build:client:sass -> Build the sass files\n" | 7 | printf " build:client:prod -> Build the client for production\n" |
8 | printf " build:client:tsc -> Build the javascript files\n" | ||
9 | printf " clean -> Clean the application\n" | 8 | printf " clean -> Clean the application\n" |
10 | printf " clean:client -> Clean the client (css, js files)\n" | 9 | printf " clean:client -> Clean the client build files (dist directory)\n" |
11 | printf " clean:client:sass -> Clean the sass build files\n" | ||
12 | printf " clean:client:tsc -> Clean the javascript files\n" | ||
13 | printf " clean:server:test -> Clean certificates, logs, uploads and database of the test instances\n" | 10 | printf " clean:server:test -> Clean certificates, logs, uploads and database of the test instances\n" |
14 | printf " watch:client -> Watch the client files\n" | 11 | printf " watch:client -> Watch the client files\n" |
15 | printf " watch:client:sass -> Watch the sass client files\n" | ||
16 | printf " watch:client:tsc -> Watch the typescript files\n" | ||
17 | printf " danger:clean:server -> /!\ Clean certificates, logs, uploads and database\n" | 12 | printf " danger:clean:server -> /!\ Clean certificates, logs, uploads and database\n" |
18 | printf " danger:clean:modules -> /!\ Clean node and typescript modules\n" | 13 | printf " danger:clean:modules -> /!\ Clean node and typescript modules\n" |
19 | printf " play -> Run 3 fresh nodes so that you can test the communication between them\n" | 14 | printf " play -> Run 3 fresh nodes so that you can test the communication between them\n" |
20 | printf " dev -> Watch, run the livereload and run the server so that you can develop the application\n" | 15 | printf " dev -> Watch, run the livereload and run the server so that you can develop the application\n" |
21 | printf " livereload -> Run the livereload on the client\n" | ||
22 | printf " start -> Run the server\n" | 16 | printf " start -> Run the server\n" |
23 | printf " test -> Run the tests\n" | 17 | printf " test -> Run the tests\n" |
24 | printf " help -> Print this help\n" | 18 | printf " help -> Print this help\n" |
diff --git a/scripts/watch/client/livereload.sh b/scripts/watch/client/livereload.sh index 5f095265e..11d27754f 100755 --- a/scripts/watch/client/livereload.sh +++ b/scripts/watch/client/livereload.sh | |||
@@ -1,3 +1,3 @@ | |||
1 | #!/usr/bin/env sh | 1 | #!/usr/bin/env sh |
2 | 2 | ||
3 | livereload client/app -e scss | 3 | livereload client/dist |
diff --git a/scripts/watch/client/sass.sh b/scripts/watch/client/sass.sh deleted file mode 100755 index f7a8c8a2b..000000000 --- a/scripts/watch/client/sass.sh +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | |||
5 | concurrently \ | ||
6 | "node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \ | ||
7 | "node-sass -w app/ --output app/" | ||
diff --git a/scripts/watch/client/webpack.sh b/scripts/watch/client/webpack.sh new file mode 100755 index 000000000..3e4522547 --- /dev/null +++ b/scripts/watch/client/webpack.sh | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | |||
5 | npm run webpack -- --config config/webpack.dev.js --progress --profile --colors --display-error-details --display-cached --watch | ||