]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - scripts/dev/server.sh
/!\ Use a dedicated config file for development
[github/Chocobozzz/PeerTube.git] / scripts / dev / server.sh
... / ...
CommitLineData
1#!/bin/bash
2
3set -eu
4
5if [ ! -f "./client/dist/en-US/index.html" ]; then
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
9 fi
10fi
11
12# Copy locales
13mkdir -p "./client/dist"
14rm -rf "./client/dist/locale"
15cp -r "./client/src/locale" "./client/dist/locale"
16
17mkdir -p "./dist/server/lib"
18
19npm run tsc -- -b -v --incremental
20npm run resolve-tspaths:server
21
22cp -r ./server/static ./server/assets ./dist/server
23cp -r "./server/lib/emails" "./dist/server/lib"
24
25./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=dev node dist/server"'