Neurologically Paralyzing Mouseovers
Have ideas to improve npm?Join in the discussion! »

@rajzik/config-typescript
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

TypeScript Config

Factory functions for creating preset TypeScript configurations. Primarily used in unison with the Lumos CLI.

Extending config

Update package.json:

{
  "lumos": {
    "typescript": {
      "allowSyntheticDefaultImports": true
    }
  }
}

Create file in configs folder:

configs/typescript.js

modules.exports = {
  allowSyntheticDefaultImports: true,
};

Settings

Main settings

export interface TypeScriptOptions {
  buildFolder: string;
  includeTests?: boolean;
  library?: boolean;
  next?: boolean;
  node?: boolean;
  react?: boolean;
  usingNext?: boolean;
  srcFolder: string;
  testsFolder: string;
  typesFolder: string;
  workspaces?: string[];
  emitDeclarationOnly?: boolean;
  allowJs?: boolean;
  skipLibCheck?: boolean;
}

Default values

{
  library = false,
  next = false,
  node = false,
  react = false,
  usingNext = false,
  emitDeclarationOnly = false,
  srcFolder = 'src',
  allowJs = false,
  skipLibCheck = false,
}

CLI Options

  • --[no-]clean
    • clean the target outDir before transpiling. Defaults to true.
  • --reference-workspaces / --reference-workspaces=<string>
    • automatically generate project references based on workspace dependency graph. Defaults to false.
  • --emitDeclarationOnly
    • emit d.ts files only
  • --noEmit
    • include tests
  • --buildFolder=<string>
    • sets build folder
  • --srcFolder=<string>
    • sets src folder
  • --testsFolder=<string>
    • sets tests folder
  • --typesFolder=<string>
    • sets types folder

Example:

lumos typescript --emitDeclarationOnly --typesFolder=types

Beemo/typescript

Install

npm i @rajzik/config-typescript

DownloadsWeekly Downloads

33

Version

3.0.4

License

MIT

Unpacked Size

268 kB

Total Files

11

Last publish

Collaborators

  • avatar