-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support optional IIFE wrapping of individual source files in compressed output #405
Labels
Comments
Another alternative that I've tried:
This meets my needs, but it's work that could be avoided if the uglify task can support it as a feature. |
Or grunt-iife. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I understand that this task supports UglifyJS's
wrap
anddefine
features for wrapping the entire code output in a closure to prevent global leaks and collisions. I have a growing collection of non-application-specific Angular modules from which I can pull specific components (dependencies) into my individual Angular applications. I enjoy having the flexibility to bundle only those global components which I need for my app, instead of requiring an entire global module (and all of its usable components).This works well in terms of the DRY principle, but it can lead to name collisions / overwrites in the compressed output if both codebases—global and app—use the same function name for functions with similar purposes (e.g.—to define default configuration vs. custom configuration).
Can this task support the optional wrapping of individual
src
files in IIFEs before the final output is written todest
? (My alternative would be to manually wrap all of my existing components, as well as all future components, in closures).The text was updated successfully, but these errors were encountered: