@podium/typescript-config

1.0.0 • Public • Published

@podium/typescript-config

Shared config for TypeScript, used in Podium projects to generate type definitions from JSDoc and test them.

Install

npm install --save-dev typescript @podium/typescript-config

Usage

Create two files in your root directory.

tsconfig.json (assuming source in lib/):

{
    "extends": "@podium/typescript-config/module.json",
    "include": ["./lib/**/*.js"],
    "compilerOptions": {
        "outDir": "types"
    }
}

tsconfig.test.json (assuming tests in tests/):

{
    "extends": "@podium/typescript-config/test.json",
    "include": ["./tests/**/*.js"]
}

You should have a similar setup in your package.json:

{
    "scripts": {
        "types": "run-s types:module types:test",
        "types:module": "tsc",
        "types:test": "tsc --project tsconfig.test.json"
    },
    "dependencies": {
        "npm-run-all2": "6.2.3"
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @podium/typescript-config

Weekly Downloads

79

Version

1.0.0

License

MIT

Unpacked Size

2.33 kB

Total Files

4

Last publish

Collaborators

  • trygve-lie
  • digitalsadhu
  • ivarconr
  • alexanbj
  • stipsan
  • trygve-bot