npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-clean-project

v4.0.3

Published

Automating the cleaning of a React Native Project

Downloads

155,958

Readme

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 Type | Command | In clean-project-auto? | Optional? | Default? | Option Flag | | ------------------------- | --------------------------------- | ------------------------ | --------- | -------- | ---------------------------- | | React-native cache | rm -rf $TMPDIR/react-* | Yes | No | true | | | Metro bundler cache | rm -rf $TMPDIR/metro-* | Yes | No | true | | | Watchman cache | watchman watch-del-all | Yes | No | true | | | NPM modules | rm -rf node_modules | Yes | Yes | true | --keep-node-modules | | Yarn cache | yarn cache clean | Yes | Yes | true | --keep-node-modules | | Yarn packages | yarn install | No | Yes | true | --keep-node-modules | | NPM cache | npm cache verify | Yes | Yes | true | --keep-node-modules | | NPM Install | npm ci | Yes | Yes | true | --keep-node-modules | | iOS build folder | rm -rf ios/build | Yes | Yes | false | --remove-iOS-build | | iOS pods folder | rm -rf ios/Pods | Yes | Yes | false | --remove-iOS-pods | | system iOS pods cache | pod cache clean --all | Yes | Yes | true | --keep-system-iOS-pods-cache | | user iOS pods cache | rm -rf ~/.cocoapods | Yes | Yes | true | --keep-user-iOS-pods-cache | | Android build folder | rm -rf android/build | Yes | Yes | false | --remove-android-build | | Android clean project | (cd android && ./gradlew clean) | Yes | Yes | false | --clean-android-project | | Brew package | brew update && brew upgrade | No | Yes | true | --keep-brew | | Pod packages | pod update | No | Yes | true | --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