summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2014-11-21 12:45:15 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2014-11-21 12:45:15 +0100
commit28c6a17bf46ef03a5712919ecffb461027cc91a6 (patch)
tree7e65461fc08562cd0585ddc6398719820b101a44
parent988cab73c68c9b8b20068de14943f35c726e956e (diff)
downloaddotfiles-28c6a17bf46ef03a5712919ecffb461027cc91a6.tar.gz
dotfiles-28c6a17bf46ef03a5712919ecffb461027cc91a6.tar.bz2
dotfiles-28c6a17bf46ef03a5712919ecffb461027cc91a6.zip
Add npm configuration for local (global) installations
So that "npm install -g" installs to ~/.local/
-rw-r--r--.config/bash/environment.sh3
-rw-r--r--.config/bash/npm-path.sh4
-rw-r--r--.npmrc1
3 files changed, 8 insertions, 0 deletions
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