1
0

Build npmrc dynamically on first run

This commit is contained in:
Noah 2016-04-17 15:00:30 -07:00
parent 116abd2d3e
commit 6f333bae07
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +0,0 @@
_auth = a2lyc2xlOjBsUUFWWHN3eGJjQURwemw=
prefix = /home/npetherbridge/.npm-global-pkg
email = root@kirsle.net

View File

@ -41,6 +41,9 @@ export WORKON_HOME=~/.virtualenvs
export GOPATH="$HOME/go" export GOPATH="$HOME/go"
# Node/npm # Node/npm
if [[ ! -f "${HOME}/.npmrc" ]]; then
echo "prefix = ${HOME}/.npm-global-pkg" > $HOME/.npmrc
fi
export NPM_PACKAGES="${HOME}/.npm-global-pkg" export NPM_PACKAGES="${HOME}/.npm-global-pkg"
export NODE_PATH="${NPM_PACKAGES}/lib/node_modules:${NODE_PATH}" export NODE_PATH="${NPM_PACKAGES}/lib/node_modules:${NODE_PATH}"
export PATH="${NPM_PACKAGES}/bin:$PATH" export PATH="${NPM_PACKAGES}/bin:$PATH"