blong blong - 1 year ago 166
CoffeeScript Question

Convert a CoffeeScript project to JavaScript (without minification)?

We're using a particular jQuery plugin written in CoffeeScript @ work and I'm desperately hoping I can convert the project into somewhat normal looking JS. The library looks like it's structured really well (good OOP practices... I think), but I'd really like it if I could explore it's source code without having to learn all the tricks that CoffeeScript entails.

The project I'm referring to is Annotator, and although it is documented, I just can't seem to get everything I want from it's wiki pages.

Thanks in advance!

Answer Source

Compiling CoffeeScript into JavaScript usually results in JS that is fairly readable. You can convert snippets on the fly on the "Try CoffeeScript" tab of the CoffeeScript homepage, or via the CoffeeScript command line tool.

On a different but slightly related note, if you know JavaScript, a perusal of the CoffeeScript homepage will probably give you enough understanding of CoffeeScript to read CoffeeScript sources fairly easily.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download