Skip to content

Instantly share code, notes, and snippets.

@yesmeck
Last active March 9, 2017 03:19
Show Gist options
  • Save yesmeck/8b55bb8788e9bfe5a92569eff33cf7b6 to your computer and use it in GitHub Desktop.
Save yesmeck/8b55bb8788e9bfe5a92569eff33cf7b6 to your computer and use it in GitHub Desktop.
Fix your js project!
#!/bin/sh
COLOR_GREEN='\033[0;32m'
echo "${COLOR_GREEN}Remove node_modules."
rm -rf node_modules
echo "${COLOR_GREEN}Remove yarn.lock."
rm -f yarn.lock
if command -v ayarn > /dev/null 2>&1; then
echo "${COLOR_GREEN}Install node_modules use ayarn."
ayarn
else
echo "${COLOR_GREEN}Install node_modules use yarn."
yarn
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment