-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clean
command
#387
Add clean
command
#387
Comments
I am okay with almost any slicing (by layer - ios/android/react-native modules, by system - metro/node_modules/watchman/etc) so long as there is at least one simple version (perhaps the default? or something that sounds thorough like 'deep-clean") that eradicates absolutely every single bit of state it is possible to eradicate, ideally leaving you with what you would have if you just finished installing base system / dev installers and had done a git clone on a repo |
So I thought a plugin might be just as good, maybe? and I saw this existing project that was close to working as a plugin, so I did a thing: pmadruga/react-native-clean-project#12 |
@mikehardy: IMO a plugin should be fine as long as we can recommend it in official channels. |
Yeah - agreed about that ability to recommend or not. I'd leave it to the repo author, and if not, it will form the basis for a possible internal implementation, sort of an incubator of the idea |
Just cross-posting status for anyone following along: I have some good feedback to respond to on the PR, but it appears the repo maintainer likes it, so leaving the discussion of "recommandable in official channels" aside, that repo will have a nice clean plugin within a couple days |
Final cross-post on this, but worth mentioning that the react-native-clean-project with my PR to do I believe a 3rd party plugin is good enough to be recommended through official channels so this issue might be resolved by that PR. I'm already recommending it to anyone for obvious state issues (haste map stuff, weird type errors after package upgrades etc) and it seems to work fine. |
@cpojer @kelset: what do you think about recommending @mikehardy's solution on the documentation in a troubleshooting section? |
Is there a desire to move functionality like this to react-native-cli? I have some semi-finished work for a "clean" command. I hadn't seen @mikehardy 's plugin before, but that does look promising. I'll look into it more. However, I really like the idea of a clean script that has official blessing from react-native. |
Just a note to say that react-native-clean-project isn't my plugin, I just found @pmadruga's work when I was looking for a clean function, and simply PR things there any time I find some new nook or cranny that isn't cleaned yet. So far seems thorough to me |
I was considering doing the same, PR-ing to an existing project. There are other similar projects, such as rn-game-over: https://github.com/taboulot/rn-game-over If we think an official implementation of this should be part of react-native-cli then I'm happy to move forward and PR it. |
Fixed by #1582 |
Describe the Feature
I catch myself quite often recommending react-native-surrender to technical but mostly non-technical people to get to a clean state when working with react-native. It would be nice to have an official
clean
command that cleans up dependencies such as fromyarn
orcocoapods
as well as Xcode, Android and watchman cache.In this idea it would automatically get what is used without the need to specify it (e.g. check for
yarn.lock
file,ios/Podfile
, etc).Possible Implementations
The text was updated successfully, but these errors were encountered: