1.1.0 • Published 4 years ago
tsconfigx v1.1.0
tsconfigx
Resolve TypeScript configuration files in tsc way.
Installation
$ yarn add tsconfigxor
$ npm i tsconfigxAPI
load / loadSync
resolve a config file, read and parse the content asynchronously or synchronously.
load(cwd: string, options?: LoadOptions): Promise<LoadResult>loadSync(cwd: string, options?: LoadOptions): LoadResult
cwd- path to a config file or a directoryoptionsfileName- custom config file name (tsconfig.jsonby default )recursive- if true, search parent directories recursively (trueby default)extends- if true, resolve extended config files (trueby default)
resolve / resolveSync
Resolve path to a config file asynchronously or synchronously.
resolve(cwd: string, options?: Options): Promise<string>resolveSync(cwd: string, options?: Options): string
cwd- path to a config file or a directoryoptionsfileName- custom config file name (tsconfig.jsonby default )recursive- if true, search parent directories recursively (trueby default)
parse
Parse JSON with comments content as a JavaScript object. Comments and trailing commas are allowed.
parse(jsonc: string): ConfigOptions
License
MIT