change to using a ~/local directory for node modules and executables

This commit is contained in:
Thomas Ruoff
2012-08-29 23:07:40 +02:00
parent 64df6cdefd
commit 22a5603976
2 changed files with 5 additions and 9 deletions

1
npmrc Normal file
View File

@@ -0,0 +1 @@
prefix = ~/local

13
zshrc
View File

@@ -30,14 +30,9 @@ source $ZSH/oh-my-zsh.sh
# Customize to your needs...
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# use $HOME/local as default prefix for npm global installs
HOME_LOCAL=$HOME/local
# local node install
NODE_PATH="$HOME/.nave/current"
if [ -d $NODE_PATH ] ; then
PATH="$NODE_PATH/bin:$PATH"
export NODE_PATH
if [ -d "$HOME_LOCAL/bin" ] ; then
PATH="$HOME_LOCAL/bin:$PATH"
fi