-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support more matching capabilties #59
Comments
Indeed, I don't really like the way the
I'll look into the library you mentioned and it's companions so that I can decide if it's possible to add it |
I'm struggling with this as well trying to do a negative lookahead. const matcher = require('wildcard-match');
const globs = [
'**/*.jsx',
'**/*.js',
'(?!dont-match/)/**/*',
];
const match = matcher(globs)
console.log(match.regexp)
// /^(?:^(?:[^/\\]*?[/\\]+?)*?[^/\\]*?\.jsx[/\\]*?$|^(?:[^/\\]*?[/\\]+?)*?[^/\\]*?\.js[/\\]*?$|^\([^/\\]!dont\-match[/\\]+?\)[/\\]+?(?:[^/\\]*?[/\\]+?)*?[^/\\]*?[/\\]*?$)$/ maybe it's possible but I'm not sure 🤷 |
Hi! I'm the author of wildcard-match. The library is indeed very basic and doesn't support many features. I have a more feature-packed library: outmatch. It has brace expansion, negation and other advanced features and should work as a drop-in replacement. I understand the reluctance to use random libraries. In case you decide to stick to the more established ones, either micromatch or picomatch are a good choice. |
https://github.com/axtgr/wildcard-match is used for matching the
onlyOn
attribute. Unfortunatelywildcard-match
does not support features like brace expansion (e.g.**/*.{js,ts}
to match.js
and.ts
files). Maybe it would be an alternative to adopt something like https://github.com/micromatch/micromatch to provide a bit more features.The text was updated successfully, but these errors were encountered: