]>
Commit | Line | Data |
---|---|---|
0e4338fd | 1 | #!/bin/bash |
0e4ffb4b LA |
2 | |
3 | set -eu | |
66dd264f | 4 | |
47f6cb31 | 5 | if [ ! -f "./client/dist/en-US/index.html" ]; then |
99ae9d3a C |
6 | if [ -z ${1+x} ] || [ "$1" != "--skip-client" ]; then |
7 | echo "client/dist/en-US/index.html does not exist, compile client files..." | |
9270bd3a | 8 | npm run build:client |
99ae9d3a | 9 | fi |
66dd264f C |
10 | fi |
11 | ||
c026a2e6 C |
12 | # Copy locales |
13 | mkdir -p "./client/dist" | |
14 | rm -rf "./client/dist/locale" | |
15 | cp -r "./client/src/locale" "./client/dist/locale" | |
16 | ||
f8360396 | 17 | mkdir -p "./dist/server/lib" |
c026a2e6 | 18 | |
9b3294a8 | 19 | npm run tsc -- -b -v --incremental |
f8360396 C |
20 | npm run resolve-tspaths:server |
21 | ||
c026a2e6 | 22 | cp -r ./server/static ./server/assets ./dist/server |
d573926e | 23 | cp -r "./server/lib/emails" "./dist/server/lib" |
c026a2e6 | 24 | |
9452d4fd | 25 | ./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=dev node dist/server"' |