.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:
parent
2053967dfd
commit
705e10f0c0
10
.zshrc
10
.zshrc
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user