react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

CLI: --exclude misleading

Open isker opened this issue 5 years ago • 0 comments

The underlying node-dir library that consumes the --exclude pattern takes a regex or an array of string literals to match against: https://github.com/fshost/node-dir/blob/a57c3b1b571dd91f464ae398090ba40f64ba38a2/lib/readfiles.js#L22-L31

When passing that arg multiple times, I had thought that I could pass multiple regexes, but that is not the case. The doc for exclude ought to make it clear that if you pass this argument multiple times, the behavior is very different than if you pass it a single time. https://github.com/reactjs/react-docgen/blob/e05219b08c8b17899be812a521b4985f2b66fae2/bin/react-docgen.js#L36-L41

isker avatar Jul 21 '19 02:07 isker