UNPKG

tsconfig-extends

Version:

load tsconfig compiler-options, support `extends` field

33 lines (21 loc) 946 B
# tsconfig-extends [![npm](https://img.shields.io/npm/v/tsconfig-extends.svg)](https://www.npmjs.com/package/tsconfig-extends) [![build](https://img.shields.io/travis/ikatyang/tsconfig-extends/master.svg)](https://travis-ci.org/ikatyang/tsconfig-extends/builds) [![coverage](https://img.shields.io/codecov/c/github/ikatyang/tsconfig-extends.svg)](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`