All Projects → pmadruga → React Native Clean Project

pmadruga / React Native Clean Project

Licence: mit
Automating the clean up of a React Native project

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Clean Project

react-native-jsi-template
Template library and blog that explain how JSI modules are built from scratch in React Native
Stars: ✭ 84 (-78.95%)
Mutual labels:  reactnative
shop-app
A shopping mobile application made with react native for Android.
Stars: ✭ 100 (-74.94%)
Mutual labels:  reactnative
Status React
a free (libre) open source, mobile OS for Ethereum
Stars: ✭ 3,307 (+728.82%)
Mutual labels:  reactnative
react-native-month-picker
This is a month picker to use in react native mobile apps.
Stars: ✭ 16 (-95.99%)
Mutual labels:  reactnative
mobimoney
Cross-platform mobile payments project for React Native
Stars: ✭ 14 (-96.49%)
Mutual labels:  reactnative
reactnative-relay-offline
Demo of how to use relay offline with React Native
Stars: ✭ 17 (-95.74%)
Mutual labels:  reactnative
showcase-app-react-native
Aplicativos nacionais feitos com React Native
Stars: ✭ 114 (-71.43%)
Mutual labels:  reactnative
Rnlive
RNLive ----> react-native 仿映客直播 支持iOS/Android
Stars: ✭ 370 (-7.27%)
Mutual labels:  reactnative
react-native-hybrid-app
Demo application ofReact Native Hybrid Application (ReactNative + Redux + RxJs)
Stars: ✭ 15 (-96.24%)
Mutual labels:  reactnative
Vasern
Vasern is a fast, lightweight and open source data storage for React Native
Stars: ✭ 283 (-29.07%)
Mutual labels:  reactnative
react-native-input-bar
Fully customizable, beautifully designed Input Bar for React Native
Stars: ✭ 32 (-91.98%)
Mutual labels:  reactnative
expo-three-orbit-controls
🎥 Three.js Orbit Controls (Camera) bridged into React Native
Stars: ✭ 43 (-89.22%)
Mutual labels:  reactnative
sebastienlorber.com
My personal website
Stars: ✭ 52 (-86.97%)
Mutual labels:  reactnative
iflux2
Reactive state container (based on immutable) for React or ReactNative, inspired by mapreduce.
Stars: ✭ 50 (-87.47%)
Mutual labels:  reactnative
Reactnativecomponents
React Native组件大全,介绍React Native常用组件的使用方法和使用示例
Stars: ✭ 317 (-20.55%)
Mutual labels:  reactnative
react-native-viewpager-indicator
修改自react-native-scrollable-tab-view,增加了根据文字内容适配下划线长度的功能。
Stars: ✭ 52 (-86.97%)
Mutual labels:  reactnative
React-Native-Integration-with-existing-app
React Native Integration with existing app
Stars: ✭ 53 (-86.72%)
Mutual labels:  reactnative
Teleport Code Generators
A collection of code generators for modern JavaScript applications
Stars: ✭ 368 (-7.77%)
Mutual labels:  reactnative
React Native Draftjs Render
React Native render for draft.js model
Stars: ✭ 368 (-7.77%)
Mutual labels:  reactnative
Reactnative Hupujrs
A Third-party Hupu App (http://bbs.hupu.com/) client implemented using React Native (Android and iOS).
Stars: ✭ 260 (-34.84%)
Mutual labels:  reactnative

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):

./node_modules/.bin/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
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: ./node_modules/.bin/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

Contributing

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

Authors

  • Pedro Madruga - Initial work and maintenance - pmadruga

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].