Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-clean-project

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-clean-project

Automating the cleaning of a React Native Project

  • 4.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 05 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc