jrit / web-resource-inliner

Inlines img, script and link tags into the same file
MIT License
66 stars 29 forks source link

Ability to specify multiple `relativeTo` values (e.g. an Array of directories to look under) #42

Open niftylettuce opened 5 years ago

niftylettuce commented 5 years ago

It would be great to permit multiple relativeTo values, such that it would search across all directories for the first match found. If multiple found then it could give a warning on command line perhaps.

niftylettuce commented 5 years ago

Related https://github.com/niftylettuce/email-templates/issues/312

jrit commented 5 years ago

I guess that or add some sort of grep option that'll search recursively through everything under some root. I would accept a PR with some form of this as long as it is not a breaking change.

niftylettuce commented 5 years ago

@jrit how would you like it to work? sequential searching in order as passed in the array? what if multiple exist, which one gets chosen?

jrit commented 5 years ago

The thing about the multiple matches is that is a fundamental problem with this kind of functionality, so as long as you decide and document how it works, it really makes no difference to me. I've never needed and don't expect to ever need this, so you are the subject matter expert here.