@shanzhai/build-tsconfig-input
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

@shanzhai/build-tsconfig-input Continuous Integration License FOSSA Status Renovate enabled npm npm type definitions

A Shanzhai input which converts TypeScript compiler options to JSON as would be found in a tsconfig.json file.

Usage

The following two examples are equivalent:

new BuildObjectInput({
  new ConstantInput({
    jsx: JsxEmit.ReactNative,
    module: ModuleKind.CommonJS,
    newLine: NewLineKind.CarriageReturnLineFeed,
    target: ScriptTarget.ES2019,
    moduleResolution: ModuleResolutionKind.NodeJs,
    lib: [`ESNext.Intl`, `ES2017.SharedMemory`, `ES7`],
    importsNotUsedAsValues: ImportsNotUsedAsValues.Preserve,
    jsxFactory: `Test JSX Factory`,
  }),
  new ConstantInput(true),
  new ConstantInput(true),
  new ConstantInput(`Test Extends`),
  new ConstantInput(`Test Compiler`),
  new ConstantInput([`Test File A`, `Test File B`]),
  new ConstantInput([`Test Exclude A`, `Test Exclude B`]),
  new ConstantInput([`Test Include A`, `Test Include B`]),
  new ConstantInput({ path: `Test Path` })
});

new ConstantInput({
  compilerOptions: {
    jsx: `react-native`,
    module: `CommonJS`,
    newLine: `crlf`,
    target: `ES2019`,
    moduleResolution: `Node`,
    lib: [`ESNext.Intl`, `ES2017.SharedMemory`, `ES7`],
    importsNotUsedAsValues: `preserve`,
    jsxFactory: `Test JSX Factory`,
  },
  compileOnSave: true,
  typeAcquisition: { enable: true },
  extends: `Test Extends`,
  "ts-node": { compiler: `Test Compiler` },
  files: [`Test File A`, `Test File B`],
  exclude: [`Test Exclude A`, `Test Exclude B`],
  include: [`Test Include A`, `Test Include B`],
  references: { path: `Test Path` },
});

Dependencies

This package has no runtime dependencies.

Peer Dependencies

This package has no runtime peer dependencies (it does not expect any other packages to be installed alongside itself).

License

FOSSA Status

Readme

Keywords

none

Package Sidebar

Install

npm i @shanzhai/build-tsconfig-input

Weekly Downloads

1

Version

0.0.10

License

MIT

Unpacked Size

21.3 kB

Total Files

21

Last publish

Collaborators

  • jameswilddev