1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 12:30:32 +01:00

Add XDG npm configuration

Add configuration to move npm to a sensible XDG basedir configuration.
Move npmrc to config, cache to cache, and global packages to data.
This commit is contained in:
Bert Peters
2016-11-27 23:03:16 +01:00
parent eb45ffa0d6
commit d4838fd56b
3 changed files with 9 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ installIfAvailable pacman
installIfAvailable git
installIfAvailable latexmk
installIfAvailable gem
installIfAvailable npm
if commandAvailable weechat; then
echo "Setting up weechat settings…"

2
npm/.config/npm/npmrc Normal file
View File

@@ -0,0 +1,2 @@
cache=${XDG_CACHE_HOME}/npm
prefix=${XDG_DATA_HOME}/npm

View File

@@ -80,3 +80,9 @@ export ATOM_HOME="$XDG_DATA_HOME"/atom
# Set up mplayer
export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer
# Set up npm
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
if [[ -d "$XDG_DATA_HOME/npm/bin" ]]; then
path+="$XDG_DATA_HOME/npm/bin"
fi