Open monokrome opened 11 years ago
@monokrome I just made a plugin that does this. I used it for my Javascript SDK in combination with brunch-for-libs. Maybe we can include it by default if you like. See: https://github.com/LogAndRoll/singlewrap-brunch
Didnt got time yet to add a good documentation but it's pretty simple to use. Upon inclusion it will wrap all a joined / minified JS file in 1 self executing function, with options to customize.
This project needs to be in it's own namespace, but brunch does not wrap output in a namespace if you aren't using CommonJS modules. If you are using them, then it creates a separate namespace for each file as expected by the CommonJS require method.