From f8360396ffabd2f95e9ece9c5755173bae0114b6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 3 Jan 2022 17:13:11 +0100 Subject: Stop using tsconfig register Prefer to replace paths at compile time --- scripts/dev/cli.sh | 3 ++- scripts/dev/server.sh | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'scripts/dev') diff --git a/scripts/dev/cli.sh b/scripts/dev/cli.sh index 4bf4808b8..327792a19 100755 --- a/scripts/dev/cli.sh +++ b/scripts/dev/cli.sh @@ -12,4 +12,5 @@ rm -rf ./dist/server/tools/ mkdir -p "./dist/server/tools" cp -r "./server/tools/node_modules" "./dist/server/tools" -npm run tsc -- --watch --sourceMap --project ./server/tools/tsconfig.json +cd ./server/tools +../../node_modules/.bin/tsc-watch --build --verbose --onSuccess 'sh -c "cd ../../ && npm run resolve-tspaths:all"' diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh index 468af0a56..9dae43a63 100755 --- a/scripts/dev/server.sh +++ b/scripts/dev/server.sh @@ -14,15 +14,12 @@ 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" +mkdir -p "./dist/server/lib" npm run tsc -- -b -v --incremental +npm run resolve-tspaths:server + cp -r ./server/static ./server/assets ./dist/server cp -r "./server/lib/emails" "./dist/server/lib" -NODE_ENV=test node node_modules/.bin/concurrently -k \ - "node_modules/.bin/nodemon --enable-source-maps --delay 1 --watch ./dist dist/server" \ - "node_modules/.bin/tsc -b -w --preserveWatchOutput" +./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=test node dist/server"' -- cgit v1.2.3