Skip to content

Commit a7dd0a0

Browse files
authored
add tsconfig.prod.json (#101)
With tsconfig.prod.json we be able to exclude __tests__ from build because in production the tests are unnecessary
1 parent 333e25a commit a7dd0a0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
},
5959
"scripts": {
6060
"prebuild": "rimraf dist",
61-
"build": "tsc",
61+
"build": "tsc -p tsconfig.prod.json",
6262
"dev": "tsnd --transpile-only --files src/index.ts | pino-pretty -c -l",
6363
"debug": "tsnd --transpile-only --inspect --files src/index.ts | pino-pretty -c -l",
6464
"cli": "tsnd --transpile-only --files src/index.ts --cli",

tsconfig.prod.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": [
4+
"src/__tests__",
5+
"src/**/__tests__"
6+
]
7+
}

0 commit comments

Comments
 (0)