@digabi/typescript-config

1.0.0 • Public • Published

typescript-config

Shared Typescript config for the digabi project.

How to add to a new project?

Add the required dependencies:

$ yarn add -D @digabi/typescript-config

Add tsconfig.json to root folder

{
  "extends": "@digabi/typescript-config/root/tsconfig.json"
}

Add tsconfig.json to server folder

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../dist"
  }
}

If you're have frontend, add tsconfig.json to public/js folder

{
  "extends": "@digabi/typescript-config/public/tsconfig.json"
}

Finally, modify .eslintrc.json in the project root. ./public/js/tsconfig.json is optional.

{
  "extends": "@digabi/eslint-config",
  "parserOptions": {
    "project": ["./public/js/tsconfig.json", "./tsconfig.json"]
  }
}

To compile server code, run

$ tsc --project server

Readme

Keywords

none

Package Sidebar

Install

npm i @digabi/typescript-config

Weekly Downloads

2,475

Version

1.0.0

License

MIT

Unpacked Size

1.79 kB

Total Files

5

Last publish

Collaborators

  • digabi