Skip to content

Commit

Permalink
chore: separate tsconfig for typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Jul 29, 2023
1 parent fbd0763 commit 065e4bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import type { Config } from '@jest/types'
const config: Config.InitialOptions = {
preset: 'ts-jest',
testEnvironment: 'node',
testPathIgnorePatterns: ['pages'],
coveragePathIgnorePatterns: ['pages', 'dist']
testPathIgnorePatterns: ['pages']
}

export default config
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"bin": "bin/index.js",
"scripts": {
"dev": "npm run build && ts-node projects/build.ts",
"build": "npm run rimraf && tsc",
"build": "npm run rimraf && tsc -p tsconfig.build.json",
"rimraf": "node -e \"require('fs').existsSync('dist') && require('fs').rmSync('dist', { recursive: true, force: true })\"",
"lint": "eslint --ext .ts . && prettier --check \"./**/*.ts\"",
"lint:fix": "eslint --ext .ts . --fix && prettier --write \"./**/*.ts\"",
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist"
},
"include": ["src/**/*"]
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
"lib": ["dom", "ES2019.Array"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
"sourceMap": true,
"strict": true,
"strictPropertyInitialization": false,
"exactOptionalPropertyTypes": true,
"target": "es5"
},
"include": ["src/**/*"]
"exclude": ["projects/**/*"]
}

0 comments on commit 065e4bb

Please sign in to comment.