aboutsummaryrefslogblamecommitdiffhomepage
path: root/scripts/watch/server.sh
blob: 2e3231865f5b7f010445ef90e63e860cc3ddf5c8 (plain) (tree)
1
2
3
4
5
6
7
8
9


         
 

                        
                             
                                                  
 
               
 


                             


                                                   
                                          

                                                                     
#!/bin/sh

set -eu

# 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"