pmadruga / react-native-clean-project

Automating the clean up of a React Native project
MIT License
1.17k stars 52 forks source link

Run clean-project-auto without React Native CLI #45

Open sonicdoe opened 3 years ago

sonicdoe commented 3 years ago

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.

pmadruga commented 3 years ago

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

sonicdoe commented 3 years ago

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

plaa commented 3 years ago

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).

gwendall commented 3 years ago

+1

pmadruga commented 3 years ago

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.

sonicdoe commented 3 years ago

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

pmadruga commented 3 years ago

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

sonicdoe commented 3 years ago

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

pmadruga commented 3 years ago

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

sonicdoe commented 3 years ago

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