diff options
-rw-r--r-- | _npmrc | 8 | ||||
-rw-r--r-- | _profile | 4 |
2 files changed, 8 insertions, 4 deletions
@@ -1,7 +1,7 @@ ;; -;; npm config +;; NPM user config ;; -;; install packages under user home directory -prefix = ${HOME}/npm - +;; Install packages under user home directory (without sudo) +;; Credit: https://github.com/glenpike/npm-g_nosudo +prefix = ${HOME}/.npm-packages @@ -30,6 +30,10 @@ _path_append() { PATH="${PATH}:$1" } +# local installed npm packages (see also `~/.npmrc`) +if [ -d "$HOME/.npm-packages/bin" ]; then + _path_prepend "${HOME}/.npm-packages/bin" +fi # local installed packages (e.g., python) if [ -d "$HOME/.local/bin" ]; then _path_prepend "${HOME}/.local/bin" |