Compiling Coffeescript from WebStorm on Windows

I have been able to set up Coffeescript compilation by calling coffee.cmd with appropriate parameters via External Tools. However, not all output ends up showing in the Run window. For instance, if there are parsing errors and compilation fails, it does so silently.
I would prefer to be able to hit a hotkey in WebStorm and compile my CoffeeScript instead of keeping a console window open to do so.
Is there any way I can forward syntax errors to the Run window?


I'd like to see an answer on this too. Either a simple way to ensure that every time we use "Run" all the .coffee files are compiled to .js files or allowing for errors to bubble up to the console while using the CoffeeScript plugin. The documentation on this is pretty sparse.


At the moment the only way to compile CoffeeScript files is External Tools.

We are working on compilation of CoffeeScript to JS by our IDEs. You could vote for the issue:


I found that adding the following to the CoffeeScript parameters in the Run/Debug Configuration (a Node.js one) does the trick:

-w -c -o [target directory] [source directory]

This automatically compiles a fresh .js file into the target directory every time you make a change to any .coffee file in the source directory. Just specify those directories in the above string.

Hope that works for you, too.


Please sign in to leave a comment.