-
-
Save aluzed/fe02b12e90cb8914f4988c2d5f7ddbf7 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 hidden or 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