Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-e parameter now handle regular espression #164

Closed
wants to merge 7 commits into from
5 changes: 5 additions & 0 deletions bin/react-docgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ var ignoreDir = argv.ignore;
var excludePatterns = argv.exclude;
var resolver;
var errorMessage;
var regexRegex = /^\/(.*)\/([igymu]{0,5})$/;
if (excludePatterns && excludePatterns.length === 1 && regexRegex.test(excludePatterns[0])){
var match = excludePatterns[0].match(regexRegex);
excludePatterns = new RegExp(match[1], match[2]);
}

if (argv.resolver) {
try {
Expand Down