Created
December 16, 2018 22:58
-
-
Save peabnuts123/55ef58567a7d226c7661c4361dd76088 to your computer and use it in GitHub Desktop.
run local version of npm commands instead of globally installed
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
# Add to your ~/.bash_profile | |
# Usage: npm-exec (command) [...args] | |
# Execute a command located in an npm bin directory, without | |
# having to manually path to it | |
function npm-exec() { | |
bin="${1}"; | |
shift | |
args="$*" | |
"$(npm bin)/${bin}" ${args}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment