]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/dev/server.sh
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / scripts / dev / server.sh
index 9b8fddac6595c2c68a225a65e415bad0315f4781..b09a966dd2fbf630af09e8f326cefafda8cbf60b 100755 (executable)
@@ -2,9 +2,24 @@
 
 set -eu
 
-if [ ! -f "./client/dist/en_US/index.html" ]; then
-  echo "client/dist/en_US/index.html does not exist, compile client files..."
-  npm run build:client
+if [ ! -f "./client/dist/en-US/index.html" ]; then
+  echo "client/dist/en-US/index.html does not exist, compile client files..."
+  npm run build:client -- --light
 fi
 
-npm run watch:server
+# Copy locales
+mkdir -p "./client/dist"
+rm -rf "./client/dist/locale"
+cp -r "./client/src/locale" "./client/dist/locale"
+
+rm -rf "./dist"
+
+mkdir "./dist"
+cp "./tsconfig.json" "./dist"
+
+npm run tsc -- --incremental --sourceMap
+cp -r ./server/static ./server/assets ./dist/server
+
+NODE_ENV=test node node_modules/.bin/concurrently -k \
+  "node_modules/.bin/nodemon --delay 1 --watch ./dist dist/server" \
+  "node_modules/.bin/tsc --incremental --sourceMap --preserveWatchOutput -w"