Package containing scripts and configs that HT2 Labs need for TypeScript projects.
- Install with
npm i -D -E @ht2-labs/typescript-project@latest
. - Create a "tsconfig.json" file in the root of your repository using the example TS config.
- Create a "tslint.json" file in the root of your repository using the example TSLint config.
- Add a
lint
script to yourpackage.json
file usingtslint
. - Add a
build
script to yourpackage.json
file usingtsc
. - Add
/dist
to your.gitignore
file. - Create a
src
folder in the root of your repository for all TypeScript source code.
{
"extends": "./node_modules/@ht2-labs/typescript-project/configs/tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"typeRoots": ["./@types", "./node_modules/@types"],
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist/**/*"]
}
{
"extends": [
"./node_modules/@ht2-labs/typescript-project/configs/tslint.json"
]
}