- adds a
--ts-config
command line parameter that takes a tsconfig and ...- 🐣passes it on to the typescript transpile step, so you can tell dependency-cruiser how you prefer to compile your code.
- 🐣 passes it on to the resolution step, so you can use things like
paths
in yourtsconfig.json
and dependency-cruiser understands them - see below for an illustration.
- ⬆️ commander, eslint, typescript
Thanks to @Bisdow for raising the issue and @ajafff for his deep typescript compiler knowledge + nudges into the right direction in the implementation of this feature.
🐦 dependency-cruiser now is on twitter as well for stuff that doesn't fit issues or PR's: @depcruise
#57: use a tsconfig in the resolution process
With these sources...
tsconfig.json
src/shared/index.ts
src/index.ts
src/something/else.ts
... this tsconfig.json:
{
"compilerOptions": {
"target": "ES2015",
"module": "commonjs",
"outDir": "./dist",
"baseUrl": "./src",
"paths": {"shared": ["./shared"]},
}
}
... and this command line...
depcruise -T dot --ts-config tsconfig.json src | dot -T svg > tmp_deps.svg