3 ms·
One feature that would be helpful is support for the Google Closure Compiler's "Advanced Mode" in the generated javascript (coffeescript right now stumbles with
by drcode 15y ago
One feature that would be helpful is support for the Google Closure Compiler's "Advanced Mode" in the generated javascript (coffeescript right now stumbles with the property renaming, especially when destructuring is used) I wish I could run this powerful "whole program optimizer" against my coffeescript code.
- MatthewPhillips 15y agoCoffeeScript doesn't have a built in minifier does it? You can still run Closure against the js output.
- jurre 15y agoYeah but it would be nice if it was just a matter of setting a flag.
- xal 15y agoI agree with this. I chipped in 1k. I know it's not the goal of the project but I hope it lays the groundwork for an optional production mode compile run for coffee script that yields optimized and / or google closure compatible code.
- pestaa 15y agoCompressed property naming would be huge improvement, but then how would you really export to outer namespaces? I recall Closure Compiler has custom syntax in multiline comments for that, but you can't (or shouldn't) expect Coffee to support it natively with custom sugar. I found closures (as opposed to classes with properties/methods) to be much more compression-friendly and it made "Advanced Mode" not worth pursuing for me.
- lynaghk 15y agoI have a CoffeeScript fork (based on Michael Bolin's work) targeting Google Closure's Advanced mode here: https://github.com/lynaghk/coffee-script https://github.com/lynaghk/coffee-script The motivating use case for me is that ClojureScript (the Clojure->JS compiler) is built on Closure, and when I've wanted to integrate third party JS into my ClojureScript projects I've found it easier to port JS to CoffeeScript than to annotate the existing JS for use with advanced mode.