dotfiles/zsh/.config/oh-my-zsh/custom/npm.zsh

16 lines
609 B
Bash
Raw Normal View History

2016-01-23 00:58:21 +00:00
# Install NPM packages globally without requiring sudo.
# Source: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
2017-02-20 00:00:41 +00:00
# Use XDG dirs
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/config
export NPM_CONFIG_CACHE=$XDG_CACHE_HOME/npm
2016-10-23 04:18:46 +00:00
export NPM_CONFIG_TMP=$XDG_RUNTIME_DIR/npm
2017-02-20 00:00:41 +00:00
export NPM_CONFIG_PREFIX=$XDG_DATA_HOME/npm
2016-10-23 04:18:46 +00:00
PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
2016-01-23 00:58:21 +00:00
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
MANPATH="$NPM_CONFIG_PREFIX/share/man:$(manpath)"
export MANPATH