Installation
Install -G coffee-script
Enter coffee in cmd to enter coffeescript command-line mode (REPL), but by the end of this blog post, I don't think it has any eggs.
Compilation of Coffeescript
1. First create a Coffeescript file, as long as ". Coffee" End is good, it is worth mentioning that Coffeescript's logo is very moving:
2. Get some Coffeescript sample code in, I've got some code copy in the official web, put it in here.
# Assignment: number =trueif= (x) x *= [1, 2, 3, 4, 5= root: math.sqrt square:square cube: x *= (winner, runners ...) if Elvis? for in list)
3. In cmd, under the path of the CD to our coffee file, and then enter
Coffee--watch--compile Test.coffee//u also cando like this coffee-w-C test.coffee
Finally we will find a test.js in our path, open a look
Very standard JS code, and some more elegant than I write, it is really a good thing.
Reference article:
http://blog.csdn.net/cloudcraft/article/details/8267259
http://coffee-script.org/
Installation and compilation of Coffeescript