Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
MIT License
Changes since v1.1.0:
This command ...
bin/dependency-cruise -T dot -x "(node_modules|json$)" src | dot -T png > dependency-cruiser-cruised.png
... will now give you this:
Changes since 1.0.4
... which is what you get when you run this:
cd test/fixtures
dependency-cruise -T dot -r rules.sub-not-allowed.json -x "(node_modules|json$)" . | dot -T png > sample-dot-output.png
'release' 1.0.1 - 1.0.4 are just documentation updates - pictures mostly (first I got them from gitlab - who apparently hadn't switched the project private -> public yet. Or I didn't switch enough switches for that. Secondly I got them from github, but made the classic mistake of not linking pictures to raw.githubusercontent but to github.com. Which works ask within github, but not outside of it. Like on npmjs.com. Or on gitlab.com :-/)
Features:
(only visible when there's something wrong wit your dependencies):
dependency-cruise -T err -v test/fixtures
Dependency-cruiser found the following illegal dependencies:
test/fixtures/cjs/root_one.js => test/fixtures/cjs/sub/dir.js
test/fixtures/cjs/sub/dir.js => test/fixtures/cjs/sub/depindir.js
test/fixtures/cjs/two_only_one.js => test/fixtures/cjs/sub/dir.js
make: *** [dependency-cruise] Error 3