Skip to content

Commit

Permalink
build: improve how the tsconfig is handled for builds to better handl…
Browse files Browse the repository at this point in the history
…e test ts checking.
  • Loading branch information
Codex- committed May 28, 2022
1 parent 2b35684 commit 6bb8618
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Expand Up @@ -2,7 +2,7 @@
"plugins": ["import", "prettier"],
"extends": ["airbnb-typescript/base", "prettier"],
"parserOptions": {
"project": "./tsconfig.test.json"
"project": "./tsconfig.json"
},
"ignorePatterns": [
"lib/__fixtures__/**/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Expand Up @@ -6,7 +6,7 @@ const config: Config.InitialOptions = {
],
globals: {
"ts-jest": {
tsconfig: "tsconfig.test.json",
tsconfig: "tsconfig.json",
},
},
moduleFileExtensions: ["ts", "js"],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -18,7 +18,8 @@
"url": "https://github.com/Codex-/cosmiconfig-typescript-loader/issues"
},
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"build:types": "tsc",
"format:check": "prettier --check \"{**/*,*}.{js,ts}\"",
"format:write": "npm run format:check -- --write",
"lint": "eslint --ext \".js,.ts\" .",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.build.json
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"sourceMap": false
},
"exclude": ["**/__fixtures__/**/*", "**/*.spec.*"]
}
5 changes: 3 additions & 2 deletions tsconfig.json
Expand Up @@ -2,8 +2,9 @@
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"noEmit": true,
"pretty": true,
"sourceMap": false,
"sourceMap": true,
"declaration": true,

"outDir": "dist",
Expand All @@ -15,5 +16,5 @@
"strict": true
},
"include": ["lib"],
"exclude": ["**/__fixtures__/**/*", "**/*.spec.*"]
"exclude": ["**/__fixtures__/**/*"]
}
7 changes: 0 additions & 7 deletions tsconfig.test.json

This file was deleted.

0 comments on commit 6bb8618

Please sign in to comment.