react-native-clean-project icon indicating copy to clipboard operation
react-native-clean-project copied to clipboard

Run clean-project-auto without React Native CLI

Open sonicdoe opened this issue 5 years ago • 10 comments

If clean-project-auto were available through the react-native-clean-project executable (or a separate react-native-clean-project-auto executable), npx could be used without having to install the React Native CLI.

In short, it would be useful to have npx react-native-clean-project --auto.

sonicdoe avatar Oct 19 '20 14:10 sonicdoe

What happens when you run npx react-native-clean-project?

pmadruga avatar Oct 29 '20 11:10 pmadruga

It runs the main executable. Therefore, it asks “Wipe iOS build folder? (Y/n)”.

sonicdoe avatar Oct 31 '20 14:10 sonicdoe

I was trying to find a command line argument for this as well. Also npx react-native-clean-project --help just starts the interactive wiping.

Command line help should be provided with -h/--help and unknown command line parameters should cause an error (like every other command line tool).

plaa avatar Nov 06 '20 12:11 plaa

+1

gwendall avatar Jan 27 '21 09:01 gwendall

To be sure, what you're requesting is the ability to do the same as clean-project-auto (meaning, that there's no brew update/upgrade, no yarn install and no pod update ).

Shouldn't be a problem, going to aim to work on it this week or the next.

pmadruga avatar Feb 15 '21 08:02 pmadruga

Exactly. In other words, provide react-native clean-project-auto through direct execution.

sonicdoe avatar Feb 16 '21 16:02 sonicdoe

What this would create is some opinionated cleanup. Meaning that it would run all the commands. Is this OK for everyone?

pmadruga avatar Mar 29 '21 14:03 pmadruga

Do you mean all commands that react-native clean-project-auto would run (for example, not pod update)?

sonicdoe avatar Mar 30 '21 07:03 sonicdoe

Yes, if that's what the community wants. What do you suggest?

pmadruga avatar Mar 30 '21 10:03 pmadruga

I think that’s good 👍 After all, that’s exactly how the existing react-native clean-project-auto command already works.

sonicdoe avatar Mar 30 '21 15:03 sonicdoe