xzyfer / sass-graph

Parses import dependencies from a directory of sass files
MIT License
76 stars 59 forks source link

[Feature Request] `--depth` option? #104

Open dosentmatter opened 5 years ago

dosentmatter commented 5 years ago

Can there be a --depth option to limit how many levels of imports we go down?

I think the implementation would be in this part of code. I think you can keep track of the current depth in the arguments and +1 each time you recurse by calling addFile(). And in that if statement, don't recurse if you have hit the maximum depth. Is this correct?

Option can be added to yargs and passed to parseDir().