dependents / node-dependency-tree

Get the dependency tree of a module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

i dont understand the directory option

VincentJ711 opened this issue · comments

I don't see the point of the directory option. What does it even do? Can this be documented? I feel like the filename option is all the client needs to provide. For example, "give me the dependency tree starting at the given filename". Thanks.

There might be ways of eliminating its use by inferring the root directory about the given filename. However, for accuracy, the root directory is taken in to avoid guessing what the root is based on the given file. That root is mostly just used as a naive fallback if compiler configuration wasn't supplied to explicitly declare the root.