robrich / gulp-match

Does a vinyl file match a condition?
MIT License
23 stars 9 forks source link

Match relative path #7

Closed TrySound closed 9 years ago

TrySound commented 9 years ago

minimatch works not good with absolute paths. I think more comfortable match relative paths like gulp.src() You can get this value by path.relative('.', file.path)

TrySound commented 9 years ago

And you can update minimatch version with 2.

TrySound commented 9 years ago

/cc @robrich

robrich commented 9 years ago

Interesting idea to make gulp match relative. I believe file.path is already relative. Would this be for the minimatch expression? If so, that would get weird if it's a negate expression. I'm also thinking . may not be the correct relative path as my vinyl file may have been rooted somewhere else.

TrySound commented 9 years ago

@robrich On windows file.path contains full path with disk.

robrich commented 9 years ago

Then perhaps matching on path.relative would be better.

robrich commented 9 years ago

Or rather file.relative.

TrySound commented 9 years ago

@robrich Thanks!