tsconfigx
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

tsconfigx

npm version CI License: MIT

Resolve TypeScript configuration files in tsc way.

Installation

$ yarn add tsconfigx

or

$ npm i tsconfigx

API

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 directory

  • options

    • fileName - custom config file name (tsconfig.json by default )
    • recursive - if true, search parent directories recursively (true by default)
    • extends - if true, resolve extended config files (true by 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 directory
  • options
    • fileName - custom config file name (tsconfig.json by default )
    • recursive - if true, search parent directories recursively (true by default)

parse

Parse JSON with comments content as a JavaScript object. Comments and trailing commas are allowed.

parse(jsonc: string): ConfigOptions

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i tsconfigx

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

82.4 kB

Total Files

43

Last publish

Collaborators

  • nokazn