您的位置:首页 > Web前端

ubuntu 下 Sublime text 2 的CoffeeScript 开发环境配置

2012-11-01 16:10 204 查看
参考自:http://soenkerohde.com/2011/11/coffeescript-with-sublime-text/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+soenkerohde+%28S%C3%B6nke+Rohde%29

/article/5649477.html

Here a little tutorial how to setup Sublime to start coding CoffeeScript:

Install CoffeeScript (You need to have node.js and the node package manager installed):
npm install -g coffee-script


Download and install Sublime Text Editor
Save the CoffeeScript.tmLanguage here: ~/Library/Application Support/Sublime Text 2/Packages/CoffeeScript/
Create the CoffeeScript.sublime-build here: ~/Library/Application Support/Sublime Text 2/Packages/Users with the following content:
{"cmd": ["coffee", "$file"],
"selector" : "source.coffee",
"path" : "/usr/bin"}


Now open Sublime and create a helloWorld.coffee:
console.log "Hello world"


CMD-B to execute the script and you should see the output:
Hello world
[Finished]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: