@wesp-up/tsconfig
v2.0.0
Published
This project maintains base tsconfig files for TypeScript projects. Each file may be extended and custom configuration may be added. This package provides a convenience of not having to copy and paste the same configs for every new project.
Downloads
2,031
Readme
@wesp-up/tsconfig
This project maintains base tsconfig files for TypeScript projects. Each file may be extended and custom configuration may be added. This package provides a convenience of not having to copy and paste the same configs for every new project.
Installation
npm install --save-dev @wesp-up/tsconfig
Usage
In your tsconfig.json
, extend the config file that suits your project. For example:
{
"extends": "@wesp-up/tsconfig/base.json",
"include": ["src"],
"compilerOptions": {
"outDir": "dist"
}
}
Note: All configuration options that use relative paths, such as includes
, excludes
, outDir
, etc. are relative to the location of the tsconfig file itself. Therefore, these configs do not use those configuration options. They must be configured by the consuming project itself.
API
Below are each of the configuration files available and their explanations.
base.json
: Base config consumed by just about all the other configs in this project with common compiler options.react.json
: Config for a React application.node.json
: Config for an NodeJS application.lib.json
: Config for a npm package.api-tests.json
: Config for an API test project.