1
0
Fork 0
peertube/scripts/build/server.sh
lutangar 06aad80165 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
2021-12-16 10:08:43 +01:00

13 lines
362 B
Bash
Executable file

#!/bin/bash
set -eu
rm -rf ./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"