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?
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 thatif
statement, don't recurse if you have hit the maximum depth. Is this correct?Option can be added to
yargs
and passed toparseDir()
.