2018-03-27 03:35:12 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
2017-06-11 04:29:03 -05:00
|
|
|
|
2019-11-29 06:36:40 -06: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 08:36:45 -06:00
|
|
|
npm run build:client -- --light
|
2017-06-11 04:29:03 -05:00
|
|
|
fi
|
|
|
|
|
2019-12-17 08:33:58 -06: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
|
|
|
|
|
|
|
|
NODE_ENV=test npm run concurrently -- -k \
|
|
|
|
"npm run nodemon -- --delay 1 --watch ./dist dist/server" \
|
|
|
|
"npm run tsc -- --incremental --sourceMap --preserveWatchOutput -w"
|