Use nvm instead of local npm

Easier to use different nodejs versions and have "global" packages
that don't need root to install.

See: https://github.com/creationix/nvm

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-10-26 00:07:35 +03:00
parent 457e075154
commit 00c06d8744
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 3 additions and 4 deletions

1
.npmrc
View File

@ -1 +0,0 @@
prefix=${HOME}/.npm-packages

6
.zshrc
View File

@ -69,9 +69,9 @@ export PAGER=less
# look for Ansible hosts file in current directory # look for Ansible hosts file in current directory
export ANSIBLE_HOSTS=hosts export ANSIBLE_HOSTS=hosts
# Enable user's "global" npm packages # Enable node version manager (nvm)
if [[ -d ~/.npm-packages/bin ]]; then if [[ -d ~/.nvm ]]; then
PATH=$PATH:~/.npm-packages/bin . ~/.nvm/nvm.sh
fi fi
# Enable pyenv # Enable pyenv