aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-10 22:57:31 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-10 22:57:31 +0200
commit75fb0c0b2efe7fb952d45d2bf111e9594f7d5b42 (patch)
treeec2f38883fd53e7e2e2d451b9275ca984631c6c1 /scripts
parent69818c9394366b954b6ba3bd697bd9d2b09f2a16 (diff)
downloadPeerTube-75fb0c0b2efe7fb952d45d2bf111e9594f7d5b42.tar.gz
PeerTube-75fb0c0b2efe7fb952d45d2bf111e9594f7d5b42.tar.zst
PeerTube-75fb0c0b2efe7fb952d45d2bf111e9594f7d5b42.zip
Adapt scripts to typescript
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh5
-rwxr-xr-xscripts/build/client/dev.sh7
-rwxr-xr-xscripts/build/server/prod.sh5
-rwxr-xr-xscripts/dev.sh2
-rwxr-xr-xscripts/help.sh2
-rwxr-xr-xscripts/play.sh2
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
3NODE_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
3cd client || exit -1
4
5rm -rf ./compiled
6
7npm 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
3rm -rf ./dist
4
5npm 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
3NODE_ENV=test concurrently -k \ 3NODE_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 @@
3printf "############# PeerTube help #############\n\n" 3printf "############# PeerTube help #############\n\n"
4printf "npm run ...\n" 4printf "npm run ...\n"
5printf " build -> Build the application for production (alias of build:client:prod)\n" 5printf " build -> Build the application for production (alias of build:client:prod)\n"
6printf " build:client:dev -> Build the client for development\n" 6printf " build:server:prod -> Build the server for production\n"
7printf " build:client:prod -> Build the client for production\n" 7printf " build:client:prod -> Build the client for production\n"
8printf " clean -> Clean the application\n" 8printf " clean -> Clean the application\n"
9printf " clean:client -> Clean the client build files (dist directory)\n" 9printf " 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
8max=${1:-3} 8max=${1:-3}
9 9
10for i in $(seq 1 $max); do 10for 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
13done 13done