From 705e10f0c02518c4bcac194219d9962d1239e360 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 13 May 2015 18:47:51 +0300 Subject: [PATCH] .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 --- .zshrc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.zshrc b/.zshrc index 606b716..7d25d44 100644 --- a/.zshrc +++ b/.zshrc @@ -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