install Coffeescript in node. js
1. My node. JS installation directory
2.node.js Global Module Directory 3.node.js installation Coffeescript
1 npm install-g coffee-script
At this point node. JS has been installed in the Coffeescript compiler, but I encountered a second installation problem, is the-w parameter will be error, Error:watch einval I in the first installation, did not encounter any problems, but at that time, There are no explicit installation steps. Some of the information that was found was not clear. However, the-c parameter-B is still available.
Sublime Installation Coffeescript1 Sublime syntax highlighting plug-in opens sublime, ctrl+shift+p-> Enter the install package and enter Coffeescript to select the first carriage return. Sublime will automatically install Coffeescript 2 Sublime Run Coffee first step to create a directory: Open C:\Users\username\AppData\Roaming\Sublime Text 3\ Create a new directory in packages Coffeescript step two: Open Sublime, menu action: Tools-build system-New build system ..., enter as follows:
1 {2 ["C:\\Program Files\\nodejs\\coffee.cmd", "$file"],3 "File_regex": "^ (... *?):( [0-9]*):? ([0-9]*) ",4 " selector ":" Source.coffee "5 }
Note Here The cmd parameter, please fill in the correct location of Coffee.cmd, may be in node. JS installation directory, may also be in the C:\users\administrator\appdata\roaming\npm\ directory. Here must fill in correctly, otherwise sublime cannot compile the reference is my own configuration: The third step, the file named Coffee.sublime-build saved to the first step in the creation of the Coffeescript directory under the fourth Test: Ctrl+b You'll see the results reference:
http://mozilla.com.cn/post/40261/
Http://freewind.me/blog/20111020/450.html
http://mozilla.com.cn/post/40258/