Closed TehShrike closed 8 years ago
Hey there, thanks for opening this issue!
would you rather not support different extensions
I know Hugh's stance is to not extend the scope of this package further, and I'm pretty "meh" about applying certain variables only to certain files: so no thank you!
Right now envify processes files of all extensions, except for
.json
.I'm in a situation where I'm requiring files of different extensions (
.html
to load template strings,.tag
for RiotJS tag files), and I need envify to apply only to.js
, and ignore those files.I think this could be added in a pretty-backwards-compatible way:
If the
env
property is not an object, the current behavior is assumed:If the
env
property is an object, its properties are used as the environment variables, and the rest of the top-level object is used for options likepurge
andextensions
:What do you think? Would you take a pull request implementing this change? Would you prefer a different implementation, or would you rather not support different extensions?