.zshrc: Change npm environment logic

Use a local npm package prefix so I can `npm install -g` without
having to give hipster npm access to /usr/lib or whatever.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-05-13 18:47:51 +03:00
parent 2053967dfd
commit 705e10f0c0
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 3 additions and 7 deletions

10
.zshrc
View File

@ -60,13 +60,9 @@ export PAGER=less
# look for Ansible hosts file in current directory
export ANSIBLE_HOSTS=hosts
# look for Node binaries in current directory
# if we have npm, we probably want to use npm binaries
# I don't like installing globally (npm -g), so add local
# node modules' bin to PATH
command -v npm >/dev/null 2>&1
if [[ $? -eq 0 ]]; then
PATH=$PATH:node_modules/.bin
# Enable user's "global" npm packages
if [[ -d ~/.npm-packages ]]; then
PATH=$PATH:~/node-packages/bin
fi
# Enable pyenv