Is there a way to integrate CoffeeScript and Eclipse, so that when I write CoffeeScript in one window the other will show the compiled code as Javascript?
I'll wait for answers. Thanks.
Is there a way to integrate CoffeeScript and Eclipse, so that when I write CoffeeScript in one window the other will show the compiled code as Javascript?
I'll wait for answers. Thanks.
I've done it with a builder and a small shell script in my project. Every time I save a .coffee file, it compiles all my scripts. Works great.
Right click on your project. Select properties near the bottom of the menu.
ProjectName/coffee-compile.sh:
The builder definition is saved as part of your project. It is in the .settings folder. That way, other developers can check out your project as well and have everything already set up.
Update: For code formatting and coloring, I ended up installing the latest beta of Aptana into Eclipse.
Update2: I've stopped using Eclipse in favor of Intellij. The editors and built in support for compiling code are wonderful. I highly suggest you try it out.
I wrote a plugin to automatically transpile CoffeeScript files (amongst others) automatically.
-> https://github.com/gossi/eclipse-transpiler-plugin
Basically, it does the same as Jon Stevens Shell script, but has a nice UI for the configuration.
I'm using
coffee
s-w
option for this. Open a terminal,cd
to your project directory and then runcoffee -w ./coffee -c ./js
. Assuming that yourcoffee
files are stored in a folder namedcoffee
and you are compiling your files to a folder namedjs
.Keep the terminal open while your coding session.
coffee
will compile your script every time you resave the file.