@digabi/typescript-config
v1.0.0
Published
Our shared Typescript config
Downloads
14,970
Readme
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