-
-
Save stites/085998c020f7d2fdfb2cf2f3638d2f73 to your computer and use it in GitHub Desktop.
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
| # lazyload nvm | |
| # all props goes to http://broken-by.me/lazy-load-nvm/ | |
| # grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/ | |
| lazynvm() { | |
| unset -f nvm node npm | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
| } | |
| nvm() { | |
| lazynvm | |
| nvm $@ | |
| } | |
| node() { | |
| lazynvm | |
| node $@ | |
| } | |
| npm() { | |
| lazynvm | |
| npm $@ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment