From 06aad80165d09a8863ab8103149a8ff518b10641 Mon Sep 17 00:00:00 2001 From: lutangar Date: Tue, 2 Nov 2021 19:11:20 +0100 Subject: chore(refactor): remove shared folder dependencies to the server Many files from the `shared` folder were importing files from the `server` folder. When attempting to use Typescript project references to describe dependencies, it highlighted a circular dependency beetween `shared` <-> `server`. The Typescript project forbid such usages. Using project references greatly improve performance by rebuilding only the updated project and not all source files. > see https://www.typescriptlang.org/docs/handbook/project-references.html --- scripts/build/server.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/build/server.sh') diff --git a/scripts/build/server.sh b/scripts/build/server.sh index b903f8250..865bdd095 100755 --- a/scripts/build/server.sh +++ b/scripts/build/server.sh @@ -4,7 +4,10 @@ set -eu rm -rf ./dist -npm run tsc -cp "./tsconfig.json" "./dist" +npm run tsc -- -b --verbose +cp "./tsconfig.base.json" "./tsconfig.json" "./dist/" +cp "./scripts/tsconfig.json" "./dist/scripts/" +cp "./server/tsconfig.json" "./dist/server/" +cp "./shared/tsconfig.json" "./dist/shared/" cp -r "./server/static" "./server/assets" "./dist/server" cp -r "./server/lib/emails" "./dist/server/lib" -- cgit v1.2.3