From cb74fd113433bd67d7d352e76e2a0310d92957b6 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 29 Oct 2016 20:40:57 +0800 Subject: Install NPM packages to ~/.npm-packages Credit: * https://github.com/glenpike/npm-g_nosudo * https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md --- _profile | 4 ++++ 1 file changed, 4 insertions(+) (limited to '_profile') diff --git a/_profile b/_profile index 7390d9c..0c9102d 100644 --- a/_profile +++ b/_profile @@ -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" -- cgit v1.2.2