2018-03-27 10:35:12 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
2017-06-11 11:29:03 +02:00
|
|
|
|
2019-11-29 13:36:40 +01:00
|
|
|
if [ ! -f "./client/dist/en-US/index.html" ]; then
|
|
|
|
echo "client/dist/en-US/index.html does not exist, compile client files..."
|
2019-01-23 15:36:45 +01:00
|
|
|
npm run build:client -- --light
|
2017-06-11 11:29:03 +02:00
|
|
|
fi
|
|
|
|
|
2019-12-17 15:33:58 +01: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"
|
|
|
|
|
|
|
|
npm run tsc -- --incremental --sourceMap
|
|
|
|
cp -r ./server/static ./server/assets ./dist/server
|
|
|
|
|
2020-01-22 10:00:38 +01:00
|
|
|
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"
|