.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

10
.zshrc
View File

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