thoughtbot / belt

Belt is a CLI for starting a new React Native Expo app and will even keep your pants secure as you continue development.
MIT License
131 stars 3 forks source link

Add validator for the application name #37

Closed laicuRoot closed 8 months ago

laicuRoot commented 8 months ago

Before, when a user introduce an application name that includes spaces, the script will exit, throwing an error.

In this PR, we confirm the application name by checking that:

laicuRoot commented 8 months ago

It's my first adventure with Typescript so any feedback is welcome about how to structure the validator in a more TypeScript way 😄 . I've written tests covering all the cases.

rakeshpetit commented 8 months ago

It does not match the string belt, as it is the name of our package.

Should we enforce this? Do we think it's a problem to use belt as the project name?

laicuRoot commented 8 months ago

Hello @rakeshpetit & @stevehanson 👋 Thank you so much for the reviews!

I will remove checking belt as a name app. It is something I saw in the Ignite package and took it from there but I see from the comments that it is unnecessary. Thank you again 🙂

laicuRoot commented 7 months ago

@stevehanson thank you for your help with this! It was bank holiday on Friday so I missed the notification of the changes. Thank you again 🙏