@bob-obringer/tsconfig
Version:
A collection of strict typescript configurations for my projects
67 lines (49 loc) • 1.57 kB
Markdown
This library is a collection of TypeScript configuration files.
It is designed to provide a set of modern and strict base configurations for
different types of TypeScript projects.
```bash
pnpm i -D @bob-obringer/tsconfig
```
```bash
npm i --save-dev @bob-obringer/tsconfig
```
```bash
yarn add --dev @bob-obringer/tsconfig
```
The library includes several TypeScript configurations for different types of projects:
- `tsconfig.app.json`
- `tsconfig.app.dom.json`
- `tsconfig.base.json`
- `tsconfig.library.json`
- `tsconfig.library.dom.json`
To use a configuration, extend your `tsconfig.json` file like so:
```json
{
"extends": "@bob-obringer/tsconfig/isomorphic-library/tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src/**/*.ts*"],
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
}
```
Extend whichever configuration is appropriate for your project
Unfortunately, typescript treats paths as relative to to the tsconfig file that
defines the paths, so they must be included in each individual package.
In addition to each of the standard configurations, there are `dev` and
`debug` versions which include additional settings for development and debugging:
```json
{
"extends": "@bob-obringer/tsconfig/debug/tsconfig.app.dom.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src/**/*.ts*"],
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
}
```