1.0.13 • Published 2 years ago
@daxtrapub/tsconfig v1.0.13
Daxtra default tsconfig
Installation
Set up git credentials for our local repo with your and
$ echo http://<USER>:<PASSWORD>@gitea.infogistics.lan%3a3000 > ~/.git-credentials
Set git to use that :
$ git config --global credential.helper store
Set up verdaccio as the registry
npm set registry http://verdaccio.infogistics.lan/
Do the install
$ npm install daxtra-tsconfig
To install from gitea at a specific tag (or similar for head). DO NOT RELEASE PRODUCTS DEPENDING ON GITEA :
$ npm install "git+http://gitea.infogistics.lan:3000/Daxtra/daxtra-tsconfig.git#v1.0.0"
Basic Usage
Install as above then :
package.json
"scripts": {
"build": "tsc --p node_modules/daxtra-tsconfig/tsconfig.json",
Usage to extend
package.json
"scripts": {
"build": "tsc --p tsconfig.json",
tsconfig.json
{
"extends": "./node_modules/daxtra-tsconfig/tsconfig.json",
"compilerOptions": {
}
}
Paths
if you are not extending the tsconfig file and you want to use the magic "@/" paths in your test you will need to include the different path :
"scripts": {
...
"test": "TS_NODE_PROJECT='./node_modules/daxtra-tsconfig/tsconfig.json' mocha --recursive --checkleaks --exit",
to get the paths to work you will need ts-node >= 10.0.0
the default is to map @/XXX
to src/XXX
and @test/XXX
to test/XXX
this can be used to avoid long ../../../XXX
requirement chains