tsconfig-extends
Version:
load tsconfig compiler-options, support `extends` field
33 lines (21 loc) • 946 B
Markdown
# tsconfig-extends
[](https://www.npmjs.com/package/tsconfig-extends)
[](https://travis-ci.org/ikatyang/tsconfig-extends/builds)
[](https://codecov.io/gh/ikatyang/tsconfig-extends)
load tsconfig compiler-options, support `extends` field
[Changelog](https://github.com/ikatyang/tsconfig-extends/blob/master/CHANGELOG.md)
## Installation
```sh
# using npm
npm install --save tsconfig-extends
# using yarn
yarn add tsconfig-extends
```
## Usage
```ts
import * as tsconfig from 'tsconfig-extends';
const compiler_options = tsconfig.load_file_sync('path/to/tsconfig.json');
```
## API
- `load_file_sync(filename: string, cwd?: string): CompilerOptions`
- `load_config_sync(tsconfig: TSConfig, cwd?: string): CompilerOptions`