Skip to content

Instantly share code, notes, and snippets.

@jwlms
Forked from kiwiupover/gist:6dd3f37f7440e146b2ee
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwlms/c6d57f61774dd9976652 to your computer and use it in GitHub Desktop.
Save jwlms/c6d57f61774dd9976652 to your computer and use it in GitHub Desktop.
function reinstall-npm-bower() {
CONT=
vared -p "Are you sure you want to update npm and bower dependancies? (y/n)? " CONT
if [ "$CONT" == "y" ]; then
install-npm-bower
echo "\n\n\n"
echo $fg[green] "Done!"
else
echo $fg[green] "Ok then!"
fi
}
function install-npm-bower() {
echo $fg[green] "Removing the node_modules and bower_components folders"
rm -rf node_modules
rm -rf bower_components
echo $fg[green] "Clean and clear the caches"
npm cache clear
bower cache clean
echo $fg[green] "Installing NPM and Bower dependancies"
npm install
bower install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment