@repodog/ts-config

5.0.1 • Public • Published

@repodog/ts-config

The Repodog tsconfig.

npm version License: MIT

Install package and dependencies

# terminal
npm install @repodog/ts-config typescript --save-dev

Use package

Configure

Project root

If you are building the project from the root.

// tsconfig.json
{
  "extends": "@repodog/ts-config/index.json",
  "include": [
    "src/**/*"
  ]
}
// tsconfig.build.json
{
  "extends": ["./tsconfig.json", "@repodog/ts-config/build.json"],
  "compilerOptions": {
    "outDir": "dist/types",
    "rootDir": "src"
  },
  "exclude": [
    "**/*.test.*"
  ]
}

Workspace root

If you are building the project from each workspace root.

// tsconfig.json
{
  "extends": "@repodog/ts-config/index.json",
  "include": [
    "packages/**/*"
  ]
}
// <workspace>/tsconfig.json
{
  "extends": ["@repodog/ts-config/index.json", "@repodog/ts-config/build.json"],
  "include": [
    "src/**/*"
  ],
  "references": []
}
// <workspace>/tsconfig.build.json
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "dist/types",
    "rootDir": "src"
  },
  "exclude": [
    "**/*.test.*"
  ]
}

Execute

// package.json
{
  "scripts": {
    "compile:types": "tsc --project ./tsconfig.build.json",
    "type-check": "tsc --noEmit"
  }
}

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @repodog/ts-config

      Weekly Downloads

      69

      Version

      5.0.1

      License

      MIT

      Unpacked Size

      4.32 kB

      Total Files

      5

      Last publish

      Collaborators

      • dylanaubrey