Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert a CoffeeScript project to JavaScript (without minification)? [closed]

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

like image 721
blong Avatar asked May 04 '12 01:05

blong


People also ask

How can we convert CoffeeScript code in JavaScript?

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.

Is CoffeeScript the same as JavaScript?

Bottom Line. One crucial difference between the two languages is that TypeScript is the superset of JavaScript while CoffeeScript is a language which is an enhanced version of JavaScript. Not just these two languages but there are other languages such as Dart, Kotlin, etc. which can be compiled into JavaScript.

How do I know if CoffeeScript is installed?

The coffee and cake commands will first look in the current folder to see if CoffeeScript is installed locally, and use that version if so. This allows different versions of CoffeeScript to be installed globally and locally.


1 Answers

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.

like image 175
Michelle Tilley Avatar answered Oct 11 '22 14:10

Michelle Tilley