]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/dev/server.sh
Use bash to run scripts
[github/Chocobozzz/PeerTube.git] / scripts / dev / server.sh
CommitLineData
0e4338fd 1#!/bin/bash
0e4ffb4b
LA
2
3set -eu
66dd264f 4
47f6cb31
C
5if [ ! -f "./client/dist/en-US/index.html" ]; then
6 echo "client/dist/en-US/index.html does not exist, compile client files..."
2adfc7ea 7 npm run build:client -- --light
66dd264f
C
8fi
9
c026a2e6
C
10# Copy locales
11mkdir -p "./client/dist"
12rm -rf "./client/dist/locale"
13cp -r "./client/src/locale" "./client/dist/locale"
14
15rm -rf "./dist"
16
17mkdir "./dist"
18cp "./tsconfig.json" "./dist"
19
20npm run tsc -- --incremental --sourceMap
21cp -r ./server/static ./server/assets ./dist/server
22
36619ac8
C
23NODE_ENV=test node node_modules/.bin/concurrently -k \
24 "node_modules/.bin/nodemon --delay 1 --watch ./dist dist/server" \
25 "node_modules/.bin/tsc --incremental --sourceMap --preserveWatchOutput -w"