Last active
May 12, 2016 07:55
-
-
Save fongreecss/a7f378acbe814c0359a0f7f40e582ba4 to your computer and use it in GitHub Desktop.
add this function to .bashrc
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
#!/bin/bash | |
function nodeupdate() { | |
ARGC=$# | |
version=latest | |
if [ $ARGC != 0 ]; then | |
version=$1 | |
fi | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n $version | |
} |
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
#!/bin/bash | |
function npmupdate() { | |
sudo npm i npm -g | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment