2020-02-19 02:56:24 -05:00
|
|
|
#!/bin/bash
|
2018-03-27 04:35:12 -04:00
|
|
|
|
|
|
|
set -eu
|
2017-06-11 05:29:03 -04:00
|
|
|
|
2019-11-29 07:36:40 -05:00
|
|
|
if [ ! -f "./client/dist/en-US/index.html" ]; then
|
2020-02-19 03:14:28 -05:00
|
|
|
if [ -z ${1+x} ] || [ "$1" != "--skip-client" ]; then
|
|
|
|
echo "client/dist/en-US/index.html does not exist, compile client files..."
|
2022-01-03 10:37:16 -05:00
|
|
|
npm run build:client
|
2020-02-19 03:14:28 -05:00
|
|
|
fi
|
2017-06-11 05:29:03 -04:00
|
|
|
fi
|
|
|
|
|
2019-12-17 09:33:58 -05:00
|
|
|
# Copy locales
|
|
|
|
mkdir -p "./client/dist"
|
|
|
|
rm -rf "./client/dist/locale"
|
|
|
|
cp -r "./client/src/locale" "./client/dist/locale"
|
|
|
|
|
2023-10-04 09:13:25 -04:00
|
|
|
mkdir -p "./dist/core/lib"
|
2019-12-17 09:33:58 -05:00
|
|
|
|
2023-07-31 08:34:36 -04:00
|
|
|
npm run tsc -- -b -v --incremental server/tsconfig.json
|
2022-01-03 11:13:11 -05:00
|
|
|
npm run resolve-tspaths:server
|
|
|
|
|
2023-10-04 09:13:25 -04:00
|
|
|
cp -r ./server/core/static ./server/core/assets ./dist/core
|
|
|
|
cp -r "./server/core/lib/emails" "./dist/core/lib"
|
2019-12-17 09:33:58 -05:00
|
|
|
|
2023-07-31 08:34:36 -04:00
|
|
|
./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=dev node dist/server"' server/tsconfig.json
|