This commit is contained in:
Franklin Yu 2015-10-28 06:02:52 +00:00
commit afd195b990
1 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,14 @@ To activate nvm, you need to source it from your shell:
I always add this line to my `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login. I always add this line to my `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login.
Often I also put in a line to use a specific version of node. Often I also put in a line to use a specific version of node.
### Homebrew
If you are on OS X using Homebrew, you can also install nvm with
```shell
brew install nvm
```
## Usage ## Usage
You can create an `.nvmrc` file containing version number in the project root directory (or any parent directory). You can create an `.nvmrc` file containing version number in the project root directory (or any parent directory).
@ -177,6 +185,14 @@ To activate, you need to source `bash_completion`:
Put the above sourcing line just below the sourcing line for NVM in your profile (`.bashrc`, `.bash_profile`). Put the above sourcing line just below the sourcing line for NVM in your profile (`.bashrc`, `.bash_profile`).
If you installed with Homebrew, the bash completion file is included with
```shell
for f in $(brew --prefix nvm)/etc/bash_completion.d/*; do
source $f
done
```
### Usage ### Usage
nvm nvm