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