Skip to content

Commit

Permalink
Use specific tsconfig for build that doesn't build test files
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Oct 10, 2024
1 parent 1435cb8 commit 4a7c900
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"email": "rafaelrozon.developer@gmail.com"
}
],
"main": "dist/lib/index.js",
"main": "dist/index.js",
"files": [
"dist/**/*",
"README.md"
],
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"generate-rule": "ts-node ./tools/generate-rule",
"lint": "eslint --fix .",
"migrate": "ts-migrate-full",
Expand Down
23 changes: 23 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"outDir": "./dist/",
"target": "es6",
"module": "Node16",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"noUncheckedIndexedAccess": true
},
"ts-node": {
"transpileOnly": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"ecmaVersion": 8,
"sourceType": "module"
},
"include": ["lib/**/*.ts"],
"exclude": ["node_modules"]
}
23 changes: 2 additions & 21 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
{
"compilerOptions": {
"outDir": "./dist/",
"target": "es6",
"module": "Node16",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"noUncheckedIndexedAccess": true
},
"ts-node": {
"transpileOnly": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"ecmaVersion": 8,
"sourceType": "module"
},
"include": ["lib/**/*.ts", "tests/**/*.ts"],
"exclude": ["node_modules"]
"extends": "./tsconfig.build.json",
"include": ["lib/**/*.ts", "tests/**/*.ts"]
}

0 comments on commit 4a7c900

Please sign in to comment.