api: specify a production build tsconfig that doesn't include tests
Pedro Lucas Porcellis porcellis@eletrotupi.com · 4 months ago
1b634a75f70686cdc5553604c0e35c6f4009df61 Browse filesParents
74ae5f1Changed files
2
Additions
+6
Deletions
-1
api/package.json
1 1
{
2 2
"name": "orbit-api",
3 3
"version": "0.0.0",
4 4
"description": "",
5 5
"license": "ISC",
7 7
"main": "src/index.ts",
8 8
"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",
16 16
"test:setup": "npm run test:setup:generate && npm run test:setup:migrate",
17 17
"test:setup:generate": "dotenv -e .env.test -o -- npx prisma generate",
64 64
"tsconfig-paths": "^4.2.0",
65 65
"tsx": "^4.21.0",
66 66
"typescript": "^6.0.2"
67 67
}
68 68
}
/dev/null → api/tsconfig.build.json
1 +
{
2 +
"extends": "./tsconfig.json",
3 +
"include": ["src/**/*"],
4 +
"exclude": ["node_modules", "dist", "tests"]
5 +
}