metalsmith / remove

A Metalsmith plugin to remove files from the build

Home Page:https://github.com/metalsmith/remove#readme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore unmatched files option

yuheiy opened this issue · comments

I'd like an option to ignore files that do not match the pattern.

// Ignore files other than markdown
metalsmith.use(ignore({ patterns: '**/*.md', unmatch: true }));

Happy for a PR for this feature.

I am not satisfied with unmatch. Do you have ideas for better name?

invert maybe.
Do you know you can do the following to invert your match

// Ignore files other than markdown
metalsmith.use(ignore({ patterns: '!**/*.md' }));

Wow, I did not know that😓

I think that it is better to use it.