From 28c6a17bf46ef03a5712919ecffb461027cc91a6 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 21 Nov 2014 12:45:15 +0100 Subject: Add npm configuration for local (global) installations So that "npm install -g" installs to ~/.local/ --- .config/bash/environment.sh | 3 +++ .config/bash/npm-path.sh | 4 ++++ .npmrc | 1 + 3 files changed, 8 insertions(+) create mode 100644 .config/bash/npm-path.sh create mode 100644 .npmrc diff --git a/.config/bash/environment.sh b/.config/bash/environment.sh index 37538b1..ec63059 100644 --- a/.config/bash/environment.sh +++ b/.config/bash/environment.sh @@ -104,3 +104,6 @@ export DVDCSS_CACHE="${XDG_CACHE_HOME}/dvdcss/" # Needed for libquvi 0.9 (0.4 automatically searches here) export LIBQUVI_SCRIPTS_DIR="${HOME}/.local/share/libquvi-scripts/" + +# Include npm definitions +source ~/.config/bash/npm-path.sh diff --git a/.config/bash/npm-path.sh b/.config/bash/npm-path.sh new file mode 100644 index 0000000..d3d211c --- /dev/null +++ b/.config/bash/npm-path.sh @@ -0,0 +1,4 @@ +export NPM_PACKAGES="${HOME}/.local/npm-packages" +export PATH="${PATH}:${NPM_PACKAGES}/bin" +export MANPATH="${MANPATH}:${NPM_PACKAGES}/share/man" +export NODE_PATH="${NPM_PACKAGES}/lib/node_modules:$NODE_PATH" diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..51ebe52 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +prefix = ${HOME}/.local/npm-packages -- cgit