2

A bash helper for clearing the ios artifacts in a react-native project

 7 months ago
source link: https://www.echojs.com/news/42032
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A bash helper for clearing the ios artifacts in a react-native projectjaleksic 17 days ago.

Disclaimer: This is not exactly a JS post as I link to bash scripts, but it is very much related to working in react-native, which is a JS context overall (in my opinion..)

I've made this nuke-ios bash helper for working in react-native projects on MacOS a while ago, and have been improving it since. I find it very helpful because I can just "flush" the moving iOS parts quickly and see if things work correctly "from scratch".

Usage:
# just delete local artifacts
nuke-ios

# also delete global XCode DerivedData
nuke-ios --global # or -g

# reinstall pods after deleting them
nuke-ios --install # or -i

https://gist.github.com/loopmode/3b02f6258620244957d83543ab14cf25

This is best used in combination with e.g. "rm -rf node_modules && nuke-ios", or even better with another alias like nuke-npm which works recursively in monorepos. See https://gist.github.com/loopmode/866c3694ef32a803d5a022cdf6409d6c for that.

I occasionally run "nuke-npm && nuke-ios -g -i" and I'm rather happy with it :)

Cheers

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK