0.0.10 • Published 2 years ago

@shanzhai/build-tsconfig-input v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago