-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Negative glob not working as expected #2275
Comments
This is same as last example from https://gulpjs.com/docs/en/getting-started/explaining-globs#special-character-negative 🤔 |
Can you try this: const {src, dest} = require('gulp');
module.exports.default = () => src(['**/*.html', '!**/bar/**']).pipe(dest('dest')); |
@phated The original link contain edited code! This still not working: This work : But when it's working for OP then this can stay closed. |
@phated Sorry, repl.it example was modified with @nstungcom idea:
I restored original code. @nstungcom What does OP stand for? |
@plesiecki this seems to be an issue with node-glob I just ran this test:
and the results are the same as what you are seeing with gulp (we use node-glob as a dependency) You can also use:
as an alternative, but I'd recommend scoping your original glob better because it picks up I'll create a followup issue to fix the docs. |
@plesiecki I would have to do a ton of research to figure out if we could use it. Even then, it might cause unexpected issues which would require a major bump. However, I did more investigating here and found that I was mistaken with the way ignores work. You need to specify |
Awesome, great work ❤️ |
Hello,
I think I noticed issue with negative glob 🤔
Files structures looks like this:
Here goes the task
After running this task
dest
dir containsbar
.I expected
dest
dir not to includebar
.I made repl.it for this issue https://repl.it/@plesiecki/InvolvedIndianredProgramminglanguages. You can reproduce with single click (by clicking green run button at the top of the page). Remember to delete
dest
directory before you run the task (if it exists)Gulp 4
Node 10.12.0
Npm 6.4.1
The text was updated successfully, but these errors were encountered: