gulp.src ignore option does not match documentation
See original GitHub issueThe gulp API docs indicate that gulp supports all options supported by node-glob:
gulp adds some additional options in addition to the options supported by node-glob and glob-stream:
Node-glob says it supports an ignore
option.
ignore Add a pattern or an array of patterns to exclude matches.
Furthermore, node-glob says to use ignore
and not to use negation:
The intent for negation would be for a pattern starting with
!
to match everything that doesn’t match the supplied pattern. However, the implementation is weird. It is better to use theignore
option to set a pattern or set of patterns to exclude from matches.
However, as indicated in issue #1176, ignore
does not work in gulp. Something is broken: the docs, the implementation, or both. Step one is to determine the desired state. Step two is to update the docs and/or code. What should the behavior be?
Issue Analytics
- State:
- Created 8 years ago
- Comments:27 (26 by maintainers)
Top GitHub Comments
i solve the ignore problem using another tricky way:
Look, I don’t know what I did to personally ruin your life @jmm but you need to stop this. Every time I respond you go line by line and tear apart every word I’m saying for no reason. I’m not here to fight anyone, I don’t understand where your aggression is coming from. I’m sorry if you think I’m a dickhead based on some github issue that happened a year ago, I was probably having a shitty day. I don’t know how many times I need to apologize before you give up your vendetta.
Honestly? I closed this issue because I don’t want to deal with your needless aggression anymore and the problem is already being fixed. I don’t have time to keep writing 5 paragraph responses defending my choice of wording on issues that were posted a year ago. This discussion seems like it’s never going to end, no matter what I do to try to fix the situation. You just want to argue forever for no apparent reason. This is the last response I’m going to post, I’ll let @phated handle it from here.
I explained the reasoning behind not using the ignore option as the primary means of negation here https://github.com/gulpjs/gulp/issues/1296#issuecomment-144583691 - there is no reason to open a new issue raising the question again. Being able to evaluate globs in order is a powerful feature we’re not going to lose (grunt does this as well).