[2012-03-20 16:18:50]
nodeの位置づけがよくわかってなかったので,やり直したのでまとめ.
インストールとcoffeescriptが使えるようになるまで
nodebrewは hokaccha/nodebrew · GitHub.
npmは npm.
coffeescriptは http://coffeescript.org/;title.
# nodebrewのインストール % curl https://raw.github.com/hokaccha/nodebrew/master/nodebrew | perl - setup ... ======================================== Add path: export PATH=$HOME/.nodebrew/current/bin:$PATH ======================================== # ~/.zshrc などに export PATH=$HOME/.nodebrew/current/bin:$PATH を追記 % source ~/.zshrc # nodeのインストール.長い % nodebrew install stable ... 'install' finished successfully (1.168s) # 使うnodeを指定 % nodebrew use stable use v0.6.13 # npmのインストール % curl http://npmjs.org/install.sh | sh ... It worked # coffeescriptのインストール % npm install -g coffee-script ... coffee-script@1.2.0 /Users/peccu/.nodebrew/current/lib/node_modules/coffee-script % coffee coffee>
これでcoffeescript使えるようになってる.
.zshrcに追記するのもPATHのexportだけで大丈夫だった.
参考
- nodeのバージョン管理はどれがいいか node.js の環境管理ツール nodebrew - Block Rockin’ Codes
- O'ReillyのCoffeeScriptを邦訳 The Little Book on CoffeeScript