-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 of CoffeeScript output #315
Comments
Is this out of scope for UglifyJS? |
Nope, not out of scope but very hard to get right in the general case. A pull request is welcome. ;-) |
Ok cool. I'll see what I can do. |
Nope, absolutely not if the transformation is done properly. ;-) But it's hard. Good luck! |
I think that this seems relevant to #320. |
I would like to note that this is generally the case with the output of many compilers targeting JS. LiveScript, Coco, and to an extent, Emscripten all do this. Such a pull request will be very useful. (Minified JS and minified compiled CoffeeScript should be at least close in size, particularly in these situations.) |
closes mishoo#1821
I'm wondering if UglifyJS2 might not be able to do a better job at compressing common output of CoffeeScript. Here an example:
Which compiles to this:
Which is uglified to this:
Shouldn't it also be possible to produce the following?
I removed the unnecessary temporary variable
e
from the last example, but mostly I'm referring to moving assignments up into the correspondingvar
declaration. I'm new to UglifyJS, so forgive me if I'm just missing a compiler flag.The text was updated successfully, but these errors were encountered: