Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Convert a CoffeeScript project to JavaScript (without minification)?

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.

Problem courtesy of: blong


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.

There are also tools like decaffeinate that convert CoffeeScript source to modern JavaScript.

If you know JavaScript and just want to be able to read the source of a file, a perusal of the CoffeeScript homepage will probably give you enough understanding of CoffeeScript to read CoffeeScript sources fairly easily.

Solution courtesy of: Michelle Tilley


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Convert a CoffeeScript project to JavaScript (without minification)?


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription