Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 876 Bytes

README.md

File metadata and controls

51 lines (37 loc) · 876 Bytes

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