Cleans your React Native project by purging caches and modules, and reinstalling them again.
yarn add -D react-native-clean-project
To run on your console, just run:
./node_modules/.bin/react-native-clean-project
Or add it as a script to your package.json
"scripts": {
"clean": "react-native-clean-project"
}
This is a combination of the commands suggested in the React Native documentation plus others. They are:
rm -rf ios/build(optional)rm -rf android/build(optional)watchman watch-del-allrm -rf $TMPDIR/react-*rm -rf $TMPDIR/metro-*brew updatebrew upgraderm -rf node_modules(optional)yarn cache cleanyarn install
Command line arguments available for CI's:
--remove-iOS-build--remove-android-build--keep-node-modules
Example: ./node_modules/.bin/react-native-clean-project --remove-iOS-build
You can also reset the Metro bundler cache when starting with react-native start --reset-cache
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Pedro Madruga - Initial work and maintenance - pmadruga
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details