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

metalsmith-ignore should be deprecated?

misterbrownlee opened this issue · comments

commented

Hi -

I think this might do well to be deprecated and dropped from the main metalsmith documentation? Per #5, the core of metalsmith includes an ignore() function that accomplishes the same functionality is this plugin.

I think the behavior of the core ignore() is different. Do calls to .ignore() get added to the plugin stack like calls to .use() do?

I have a workflow that needs to ignore some files and directories, but only after I've already processed them with custom plugins. No matter how far down in the call order I placed .ignore(), I could never get it to behave like I expected. Calls to .use(ignore()) do give me the behavior I expect, and they clearly get added to the plugin stack.

As far as I can tell, core ignore() doesn't respect the order in which it's called, which won't work for my use case.

Behaviour is different