dependency-cruiser
dependency-cruiser copied to clipboard
Feature request: Similar to reaches, add support for leaves
Add support for option leaves
Love this tool, but I am not able to solve one use case, when I want to understand what are the dependencies of a particular file.
focus
gives incoming and outgoing nodes both, reaches
gives incoming nodes, there is no option for just the outgoing nodes from a particular file.
Similar to https://github.com/sverweij/dependency-cruiser/issues/632, can we add support for --leaves
command line argument.
Expected Behavior
If I have dependencies,
A -> B -> C and C -> E -> F and C -> G
if I pass the path B
to leaves
, it should generate the graph,
B -> C -> E -> F
-> G
I can pick this up if there exists no way to achieve what I want.
Hi @lambainsaan would pointing dependency-cruiser to the root file achieve what you want? E.g. (with the simple text
reporter) like this:
depcruise src/B.ts -T text
# result would look something like this
# B.ts -> C.ts
# C.ts -> E.ts
# C.ts -> G.ts
# E.ts -> F.ts
The way dependency-cruiser works is it would look at B.ts, find its dependencies, look at each of these in the same way etc. until there's nothing more to find that hasn't already been visited.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.