gulp-wrap-umd
gulp-wrap-umd copied to clipboard
added new option: `globalExportTemplate`
what is the use case for this? It seems like a really complex feature for what I feel isn't gaining much benefit.
Sometimes I want to initialize the namespace before adding whatever comes out of factory
to that namespace. This happens when all I'm returning from factory
is a function, rather than an object that contains the exported functions.
Also, I have a use case where I want all of the functions exported to be added to the namespace, but there is also an additional namespace exported that I do not want to be contained within the namespace that contains all of the functions exported.
I tried to make the modification general enough such that it wouldn't just solve my two use cases but also allow for other unforseen use cases in the future.
basically, AMD and CommonJS exports are very straightforward and standard...where a "global" export might not always be so standard and, thus, some amount of control/customization may be needed by users of the plugin.