Skip to content
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

Compression option #8

Open
optimalisatie opened this issue Dec 10, 2018 · 0 comments
Open

Compression option #8

optimalisatie opened this issue Dec 10, 2018 · 0 comments

Comments

@optimalisatie
Copy link

First of all thanks for the great Grunt plugin! We have been using it in many projects.

We currently require to modify the output manually to achieve better compression. For example, it is possible to create a IIFE using !function(){}() which would save some extra bytes.

If you would ever want to improve the plugin, I hereby want to suggest to add a compression option including unary_operator option.

!function(){ /* code */ }();   // returns true by default
~function(){ /* code */ }();   // returns -1 by default
-function(){ /* code */ }();   // returns NaN by default
+function(){ /* code */ }();   // returns NaN by default

More IIFE techniques are available on https://digitalfortress.tech/js/exclamation-mark-function-iife/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant