Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
371 views
in Technique[技术] by (71.8m points)

android - How can I clean my react-native project to back it up?

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.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To clean

Clean deriveddata with xcode project

cd ios
xcodebuild clean

Clean ios build folder

rm -rf ios/build

Clean ios pods

rm -rf ios/Pods

Clean android studio

cd android
./gradlew clean

Clean android build folders

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

Clean gradle cache

rm -rf android/.gradle

Clean node modules

rm -rf node_modules

Clean watchman cache

watchman watch-del-all

Clean npm cache

npm cache clean

You can now archive everything!

To use a backup

Install back package.json's npm modules

npm install

Install back iOS Pods

cd ios/
pod install

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...