From 4954daa0246756aeea1960b7ed2a5fbef95fc83e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 17 Jun 2017 01:44:58 +0200 Subject: [PATCH] npm global stuff for ubuntu --- .bashrc | 8 ++++++++ .npmrc | 1 + bin/install-dotfiles.sh | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .npmrc diff --git a/.bashrc b/.bashrc index fd2681d..8fc359a 100644 --- a/.bashrc +++ b/.bashrc @@ -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)" diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..5cf9847 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +prefix=/home/m/.npm-packages diff --git a/bin/install-dotfiles.sh b/bin/install-dotfiles.sh index 144704a..5f16f4c 100755 --- a/bin/install-dotfiles.sh +++ b/bin/install-dotfiles.sh @@ -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