The Repodog tsconfig.
# terminal
npm install @repodog/ts-config typescript --save-dev
If you are building the project from the root.
// tsconfig.json
{
"extends": "@repodog/ts-config/index.json",
"include": [
"src/**/*"
]
}
// tsconfig.build.json
{
"extends": ["./tsconfig.json", "@repodog/ts-config/build.json"],
"compilerOptions": {
"outDir": "dist/types",
"rootDir": "src"
},
"exclude": [
"**/*.test.*"
]
}
If you are building the project from each workspace root.
// tsconfig.json
{
"extends": "@repodog/ts-config/index.json",
"include": [
"packages/**/*"
]
}
// <workspace>/tsconfig.json
{
"extends": ["@repodog/ts-config/index.json", "@repodog/ts-config/build.json"],
"include": [
"src/**/*"
],
"references": []
}
// <workspace>/tsconfig.build.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist/types",
"rootDir": "src"
},
"exclude": [
"**/*.test.*"
]
}
// package.json
{
"scripts": {
"compile:types": "tsc --project ./tsconfig.build.json",
"type-check": "tsc --noEmit"
}
}