diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 5 | ||||
-rwxr-xr-x | scripts/build/client/dev.sh | 7 | ||||
-rwxr-xr-x | scripts/build/server/prod.sh | 5 | ||||
-rwxr-xr-x | scripts/dev.sh | 2 | ||||
-rwxr-xr-x | scripts/help.sh | 2 | ||||
-rwxr-xr-x | scripts/play.sh | 2 |
6 files changed, 13 insertions, 10 deletions
diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 000000000..5be6afcdf --- /dev/null +++ b/scripts/build.sh | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | NODE_ENV=test concurrently \ | ||
4 | "npm run build:client:prod" \ | ||
5 | "npm run build:server:prod" | ||
diff --git a/scripts/build/client/dev.sh b/scripts/build/client/dev.sh deleted file mode 100755 index 1fd0ad416..000000000 --- a/scripts/build/client/dev.sh +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | cd client || exit -1 | ||
4 | |||
5 | rm -rf ./compiled | ||
6 | |||
7 | npm run webpack -- --config config/webpack.dev.js --progress --profile --colors --display-error-details --display-cached | ||
diff --git a/scripts/build/server/prod.sh b/scripts/build/server/prod.sh new file mode 100755 index 000000000..811da2154 --- /dev/null +++ b/scripts/build/server/prod.sh | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | rm -rf ./dist | ||
4 | |||
5 | npm run tsc | ||
diff --git a/scripts/dev.sh b/scripts/dev.sh index 3f5b83f12..1cfa638ad 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh | |||
@@ -2,4 +2,4 @@ | |||
2 | 2 | ||
3 | NODE_ENV=test concurrently -k \ | 3 | NODE_ENV=test concurrently -k \ |
4 | "npm run watch:client" \ | 4 | "npm run watch:client" \ |
5 | "npm start" | 5 | "tsc && npm start" |
diff --git a/scripts/help.sh b/scripts/help.sh index 0f672d520..51f55547e 100755 --- a/scripts/help.sh +++ b/scripts/help.sh | |||
@@ -3,7 +3,7 @@ | |||
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 for production (alias of build:client:prod)\n" | 5 | printf " build -> Build the application for production (alias of build:client:prod)\n" |
6 | printf " build:client:dev -> Build the client for development\n" | 6 | printf " build:server:prod -> Build the server for production\n" |
7 | printf " build:client:prod -> Build the client for production\n" | 7 | printf " build:client:prod -> Build the client for production\n" |
8 | printf " clean -> Clean the application\n" | 8 | printf " clean -> Clean the application\n" |
9 | printf " clean:client -> Clean the client build files (dist directory)\n" | 9 | printf " clean:client -> Clean the client build files (dist directory)\n" |
diff --git a/scripts/play.sh b/scripts/play.sh index ab812025c..3cfd82679 100755 --- a/scripts/play.sh +++ b/scripts/play.sh | |||
@@ -8,6 +8,6 @@ fi | |||
8 | max=${1:-3} | 8 | max=${1:-3} |
9 | 9 | ||
10 | for i in $(seq 1 $max); do | 10 | for i in $(seq 1 $max); do |
11 | NODE_ENV=test NODE_APP_INSTANCE=$i node server.js & | 11 | NODE_ENV=test NODE_APP_INSTANCE=$i node dist/server.js & |
12 | sleep 1 | 12 | sleep 1 |
13 | done | 13 | done |