npm global stuff for ubuntu

This commit is contained in:
Matthias Kretschmann 2017-06-17 01:44:58 +02:00
parent b9ad027a52
commit 4954daa024
3 changed files with 10 additions and 1 deletions

View File

@ -84,3 +84,11 @@ if [ -x /usr/bin/dircolors ]; then
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
export NPM_PACKAGES="$HOME/.npm-packages"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"

1
.npmrc Normal file
View File

@ -0,0 +1 @@
prefix=/home/m/.npm-packages

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# list of files/folders to symlink in homedir
FILES=".bash_aliases .bash_prompt .bashrc .profile bin .vimrc"
FILES=".bash_aliases .bash_prompt .bashrc .profile bin .vimrc .npmrc"
for FILE in $FILES; do