mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 20:40: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:
@@ -51,6 +51,7 @@ installIfAvailable pacman
|
|||||||
installIfAvailable git
|
installIfAvailable git
|
||||||
installIfAvailable latexmk
|
installIfAvailable latexmk
|
||||||
installIfAvailable gem
|
installIfAvailable gem
|
||||||
|
installIfAvailable npm
|
||||||
|
|
||||||
if commandAvailable weechat; then
|
if commandAvailable weechat; then
|
||||||
echo "Setting up weechat settings…"
|
echo "Setting up weechat settings…"
|
||||||
|
|||||||
2
npm/.config/npm/npmrc
Normal file
2
npm/.config/npm/npmrc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
cache=${XDG_CACHE_HOME}/npm
|
||||||
|
prefix=${XDG_DATA_HOME}/npm
|
||||||
@@ -80,3 +80,9 @@ export ATOM_HOME="$XDG_DATA_HOME"/atom
|
|||||||
|
|
||||||
# Set up mplayer
|
# Set up mplayer
|
||||||
export MPLAYER_HOME="$XDG_CONFIG_HOME"/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
|
||||||
|
|||||||
Reference in New Issue
Block a user