@ht2-labs/typescript-project
v2.0.62
Published
A package containing what HT2 Labs needs for TypeScript projects.
Downloads
819
Readme
TypeScript Project
Package containing scripts and configs that HT2 Labs need for TypeScript projects.
Usage
- 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.
TS Config Example
{
"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/**/*"]
}
TSLint Config Example
{
"extends": [
"./node_modules/@ht2-labs/typescript-project/configs/tslint.json"
]
}