4.0.3 • Published 5 months ago

react-native-clean-project v4.0.3

Weekly downloads
14,490
License
MIT
Repository
github
Last release
5 months ago

React Native Clean Project

npm version https://img.shields.io/github/license/pmadruga/react-native-clean-project.svg GitHub issues Build Status

Cleans your React Native project by purging caches and modules, and reinstalling them again.

Installing

yarn add -D react-native-clean-project

Running

React-Native CLI plugin

This module is automatically detected as a plugin by the standard react-native command, adding new sub-commands:

  • react-native clean-project-auto - fully automated project state clean: like a freshly-cloned, never-started repo
  • react-native clean-project - interactive project state clean: choose types of react-native state to clean

Direct execution

For complete control (including using command-line arguments to non-interactively fine-tune what state is cleaned):

npx react-native-clean-project

Or add it as a script to your package.json

"scripts": {
  "clean": "react-native-clean-project"
}

Content

This is a combination of the commands suggested in the React Native documentation plus others.

State TypeCommandIn clean-project-auto?Optional?Default?Option Flag
React-native cacherm -rf $TMPDIR/react-*YesNotrue
Metro bundler cacherm -rf $TMPDIR/metro-*YesNotrue
Watchman cachewatchman watch-del-allYesNotrue
NPM modulesrm -rf node_modulesYesYestrue--keep-node-modules
Yarn cacheyarn cache cleanYesYestrue--keep-node-modules
Yarn packagesyarn installNoYestrue--keep-node-modules
NPM cachenpm cache verifyYesYestrue--keep-node-modules
NPM Installnpm ciYesYestrue--keep-node-modules
iOS build folderrm -rf ios/buildYesYesfalse--remove-iOS-build
iOS pods folderrm -rf ios/PodsYesYesfalse--remove-iOS-pods
system iOS pods cachepod cache clean --allYesYestrue--keep-system-iOS-pods-cache
user iOS pods cacherm -rf ~/.cocoapodsYesYestrue--keep-user-iOS-pods-cache
Android build folderrm -rf android/buildYesYesfalse--remove-android-build
Android clean project(cd android && ./gradlew clean)YesYesfalse--clean-android-project
Brew packagebrew update && brew upgradeNoYestrue--keep-brew
Pod packagespod updateNoYestrue--keep-pods

Example: npx react-native-clean-project --remove-iOS-build

Other Tips

You can also reset the Metro bundler cache when starting with react-native start --reset-cache

Support

This library does not support windows. PR's are welcome.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

4.0.3

5 months ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.0-alpha2.0

3 years ago

4.0.0-alpha1.0

3 years ago

4.0.0-alpha4.0

3 years ago

4.0.0-alpha3.0

3 years ago

3.6.6

3 years ago

3.6.7

3 years ago

3.6.5

3 years ago

3.6.4

3 years ago

3.6.2

3 years ago

3.6.3

3 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.4.0

4 years ago

3.3.0

4 years ago

3.2.4

5 years ago

3.2.3

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago