Skip to content

Instantly share code, notes, and snippets.

@juanlet
Created September 25, 2019 06:19
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 juanlet/593476af21a62bd829db676ff62b9127 to your computer and use it in GitHub Desktop.
Save juanlet/593476af21a62bd829db676ff62b9127 to your computer and use it in GitHub Desktop.
react native clear script to rebuild project
// scripts/Clear.sh
#!/bin/bash
echo "rm -rf ios/build..."
rm -rf ios/build
echo "rm -rf android/app/build..."
rm -rf android/app/build
echo "Removed all Xcode derived data..."
rm -rf ~/Library/Developer/Xcode/DerivedData
echo "rm -rf lib... (for Flow)"
rm -rf lib
echo "watchman watch-del-all..."
watchman watch-del-all
echo "rm -rf node_modules..."
rm -rf node_modules
echo "npm install..."
npm install
echo "rm -rf $TMPDIR/ react-*..."
rm -rf $TMPDIR/ react-*
echo "rm -rf $TMPDIR/haste-map-react-native-packager-*..."
rm -rf $TMPDIR/haste-map-react-native-packager-*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment