1
0
Fork 0
peertube/scripts/dev/server.sh

29 lines
753 B
Bash
Raw Normal View History

2020-02-19 07:56:24 +00:00
#!/bin/bash
2018-03-27 08:35:12 +00:00
set -eu
2017-06-11 09:29:03 +00:00
2019-11-29 12:36:40 +00:00
if [ ! -f "./client/dist/en-US/index.html" ]; then
2020-02-19 08:14:28 +00:00
if [ -z ${1+x} ] || [ "$1" != "--skip-client" ]; then
echo "client/dist/en-US/index.html does not exist, compile client files..."
npm run build:client -- --light
fi
2017-06-11 09:29:03 +00:00
fi
2019-12-17 14:33:58 +00:00
# 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"
2021-12-14 12:48:13 +00:00
npm run tsc -- -b -v --incremental
2019-12-17 14:33:58 +00:00
cp -r ./server/static ./server/assets ./dist/server
2020-07-28 07:57:16 +00:00
cp -r "./server/lib/emails" "./dist/server/lib"
2019-12-17 14:33:58 +00:00
2020-01-22 09:00:38 +00:00
NODE_ENV=test node node_modules/.bin/concurrently -k \
"node_modules/.bin/nodemon --delay 1 --watch ./dist dist/server" \
2021-12-14 12:48:13 +00:00
"node_modules/.bin/tsc -b -w --preserveWatchOutput"