Coffeescript / How to compile Coffeescript to Javascript

This instruction is valid for Ubuntu/Debian systems.
Suppose you have a file that you'd like to be compiled.
At first, let's install the Coffeescript itself:

$ sudo apt-get install coffeescript

Then call coffee executable with proper parameters:

$ coffee --compile server.js

The first parameter is self-descriptive, then goes the destination file name and then the source file name.

It's also possible to use entire folders in dst/src parameters like

coffee --compile lib src

No comments:

Post a Comment