Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoffeeScript compiler without node.js?

I'd like to use CoffeeScript(CS) and the CS Compiler but without having to install Node.js.

I saw that the core compiler of CS is in JavaScript, so there's no need for Node.js to be installed, but I can't find any compiler written in Python/Java or any other languages, only Node.js.

Am I missing something? Will I have to write my own implementation in Python?

like image 932
Cyril N. Avatar asked Oct 21 '25 12:10

Cyril N.


2 Answers

You can run javascript in python with http://code.google.com/p/pyv8/.

You would run the javascript code for CoffeeScript compiler, and then compile CoffeeScript with that.

like image 146
Esailija Avatar answered Oct 23 '25 07:10

Esailija


If you don't want to install node.js, you could compile them in your web browser. Rough details of how to do that are in the docs.

If you don't want to use your browser you can run that script in anything capable of running javascript, e.g. Rhino on Java, pyv8 in python, etc.

like image 25
Michael Anderson Avatar answered Oct 23 '25 09:10

Michael Anderson