npm dependency-cruiser 4.4.0
walking the typescript path (v4.4.0)

latest releases: 16.6.0, 16.6.0-beta-1, 16.5.0...
6 years ago
  • 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 your tsconfig.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

before

before - sad polar bear

after

after - manic pinguin

Don't miss a new dependency-cruiser release

NewReleases is sending notifications on new releases.