Skip to content

Instantly share code, notes, and snippets.

@wastemobile
Last active August 29, 2015 14:06
Show Gist options
  • Save wastemobile/8fd4ea1f134d14df12d9 to your computer and use it in GitHub Desktop.
Save wastemobile/8fd4ea1f134d14df12d9 to your computer and use it in GitHub Desktop.
Develop Environment Setup
## Node
安裝 nvm 管理 node 與 npm,這個程序若使用 Homebrew 安裝,就算看起來沒問題,但使用一陣子、多半是有更新時,很容易出錯,因此改採自行安裝的方法。
1. git clone https://github.com/creationix/nvm.git ~/.nvm
2. cd ~/.nvm
3. git checkout `git describe --abbrev=0 --tags`
git describe 是尋找距離目前最近的 tag,預設是找正式的標籤,加上參數 `--tags` 則連同輕量級(lightweight - non-annotated tag)也算在內;參數 `--abbrev=<n>` 是修改以七位 hexadecimal 數字的預設,當 `<n>` 等於 `0` 則會捨棄預設的長格式,只將最近的標籤拿來使用。
因為 nvm 倉儲持續開發,若是使用 `git pull` 會拉回尚不穩定的最新版本,不一定符合需求,因此要加入第三步的指令,確保開發環境的穩定。
## PHP
## Ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment