Last active
June 1, 2018 10:21
-
-
Save arnaudcourtecuisse/1e2b8a50b95ad2d19ebe49aa20bc4ed0 to your computer and use it in GitHub Desktop.
Add this in your .bashrc to have your local node_modules/.bin in your path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT_COMMAND=__prompt_command | |
__prompt_command() { | |
# Remove previous existing .bin in $PATH | |
PATH=$(echo $PATH | sed -e "s@[^:]\+node_modules/.bin@@ ; s/\(^:\|:$\)// ; s/::/:/") | |
# Add current .bin and export | |
export PATH=$(npm bin):$PATH | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment