Last active
February 7, 2020 11:24
-
-
Save oliverbenns/1632e68db89827c7362dccbcccbcad59 to your computer and use it in GitHub Desktop.
Hard clean react native
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 | |
# This script does a hard clean of caches and dependencies. It can be | |
# particularly useful when switching between branches with different | |
# native module packages or react native versions. It may take awhile to run. | |
printf "Cleaning cache\n" | |
rm -rf $TMPDIR/react-native-packager-cache-*; | |
rm -rf $TMPDIR/metro-bundler-cache-*; | |
printf "Reinstalling node modules\n" | |
rm -rf node_modules; | |
npm install; | |
printf "Cleaning ios\n" | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
pushd ios; | |
rm -rf Pods; | |
pod deintegrate && pod cache clean --all | |
pod install; | |
popd; | |
printf "Cleaning android\n" | |
pushd android; | |
./gradlew clean; | |
rm -rf .idea | |
popd; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment