api: specify a production build tsconfig that doesn't include tests

Pedro Lucas Porcellis porcellis@eletrotupi.com 11 days ago 1b634a75f70686cdc5553604c0e35c6f4009df61
Parents: 74ae5f1
2 file(s) changed
  • api/package.json +1 -1
  • api/tsconfig.build.json +5 -0
api/package.json
@@ -9,7 +9,7 @@ "directories": {
9 9 "test": "tests"
10 10 },
11 11 "scripts": {
12 - "build": "tsc && tsc-alias",
12 + "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
13 13 "prod": "node dist/index.js",
14 14 "start": "nodemon src/index.ts",
15 15 "test": "npm run test:setup && dotenv -e .env.test -o -- npx ava",
api/tsconfig.build.json
@@ -0,0 +1,5 @@
1 + {
2 + "extends": "./tsconfig.json",
3 + "include": ["src/**/*"],
4 + "exclude": ["node_modules", "dist", "tests"]
5 + }