From fc6fec5f4bcd06271266c12adc497d221e045a2d Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Mon, 20 Feb 2017 13:00:41 +1300 Subject: [PATCH] Update xdg dirs in zsh's npm config --- zsh/.oh-my-zsh/custom/npm.zsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zsh/.oh-my-zsh/custom/npm.zsh b/zsh/.oh-my-zsh/custom/npm.zsh index e9d29ac..4fb6e50 100644 --- a/zsh/.oh-my-zsh/custom/npm.zsh +++ b/zsh/.oh-my-zsh/custom/npm.zsh @@ -1,10 +1,11 @@ # Install NPM packages globally without requiring sudo. # Source: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md -export NPM_CONFIG_USERCONFIG=$HOME/.config/npm/config -export NPM_CONFIG_CACHE=$HOME/.cache/npm +# Use XDG dirs +export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/config +export NPM_CONFIG_CACHE=$XDG_CACHE_HOME/npm export NPM_CONFIG_TMP=$XDG_RUNTIME_DIR/npm -export NPM_CONFIG_PREFIX=$HOME/.local/share/npm +export NPM_CONFIG_PREFIX=$XDG_DATA_HOME/npm PATH="$NPM_CONFIG_PREFIX/bin:$PATH"