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

Pass filename relative to cwd to minimatch #17

Closed
wants to merge 1 commit into from
Closed

Pass filename relative to cwd to minimatch #17

wants to merge 1 commit into from

Conversation

soumya92
Copy link

This retains the fix for #1 while allowing use of ** in glob
patterns. Making both **/vendor/**/*.js and !*.json match the
expected files.

This retains the fix for #1 while allowing use of ‘**’ in glob
patterns. Making both “**/vendor/**/*.js” and “!*.json” match the
expected files.
@sindresorhus
Copy link
Owner

No, it should use the relative path to base, not to cwd.

@soumya92
Copy link
Author

This would help solve #5 though. file.relative is only the filename. ** will never be useful in just the filename, making filtering far more limited.

Consider the tree:
scripts
|-- vendor
|-- public

How would you filter .coffee files in just the vendor folder?

@sindresorhus
Copy link
Owner

file.relative is only the filename.

file.relative is the relative path from base, which by default is your gulpfile.

How would you filter .coffee files in just the vendor folder?

scripts/vendor/*.coffee?

@soumya92
Copy link
Author

Huh. Must be something weird in my setup, then. Thanks for looking at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants