Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Normal Coffeescript editor needed

I must use CoffeeScript in my work. It is a big stopper, because often I do not understand what it is expected to write and where the error is.

At the moment I use only the online conversion tools, as js2coffee.org and the desktop application - RubyMine editor. Both are very poor in giving me clues what the syntax should be and even at which position in the source text the actual error sits.

Could you suggest some decent CoffeeScript editor with perfect error feedback and even better - with instant conversion to JavaScript, like js2coffee.org does?

like image 689
Paul Avatar asked Dec 15 '25 06:12

Paul


2 Answers

Actually a decent debugger is still one of the big drawbacks when using Coffeescript. However, I find it sufficient to use Coffeescripts´s module running on Node.js. There are a few steps to conquer, but when you finally get there, it is quite a pleasant working environment for Coffeescript.

Download and install NodeJS as well as npm, what usually comes with NodeJS. Run

npm install -g coffee-script

on your command line to install Coffeescript. Move to your desired directory, create a test.coffee file and run

coffee -cwb test.coffee

Now you can edit the test.coffee file with your favored editor (I prefer Notepad++) and the edited coffeescript file is compiled at any change. On top of that, the Coffeescript module outputs some more or less helpful error message to trouble shoot your issues more efficiently.

For more information on how to run Coffeescript from the command line, have a look at Coffeescript´s Homepage.

like image 200
Amberlamps Avatar answered Dec 16 '25 23:12

Amberlamps


It looks like this JetBrains feature may be right up your alley.

http://confluence.jetbrains.com/display/RUBYDEV/Debugging+CoffeeScript+Code

like image 25
Thomas Avatar answered Dec 16 '25 21:12

Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!