本文介绍了如何清理我的本地反应项目以备份它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用React-Native开发移动应用程序,并且因为我是它的唯一开发者,所以我不想使用git这样的版本控制工具,也不想将其托管在云上(信任原因...),并且想知道在硬件丢失的情况下如何备份本机项目.

I'm developing a mobile app using React-Native, and as I'm the only developer of it, I don't want to use a versioning tool like git, I don't want to host it on the cloud (trust reasons...), and was wondering how can I make backup of my react-native project, in case of an hardware loss.

最明显的方法是只归档所有内容,但是它的重量为2.2GB,压缩后约为800mb.一次备份可以,但是如果我要进行定期备份怎么办?

The obvious way would be to just archive everything, but it weight 2.2GB and about 800mb once compressed. It's ok for one backup, but what if I want to make regular backups?

推荐答案

要清洁

使用xcode项目清理派生数据

To clean

Clean deriveddata with xcode project

cd ios
xcodebuild clean

清理ios构建文件夹

rm -rf ios/build

清洁ios豆荚

rm -rf ios/Pods

清洁android studio

Clean android studio

cd android
./gradlew clean

清理android构建文件夹

Clean android build folders

rm -rf android/build
rm -rf android/app/build

清理gradle缓存

rm -rf android/.gradle

清洁节点模块

rm -rf node_modules

清洁守望者缓存

watchman watch-del-all

清理npm缓存

npm cache clean

您现在可以存档所有内容!

You can now archive everything!

重新安装package.json的npm模块

Install back package.json's npm modules

npm install

重新安装iOS Pods

Install back iOS Pods

cd ios/
pod install

这篇关于如何清理我的本地反应项目以备份它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 15:54