-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-cli): Prompt user for options (no args with gatsby new) #14097
Conversation
Nice! I would add to the discussion:
As for your question - I would keep default starter as default choice (especially if we would move forward with my 2nd discussion item) This is minor and not really relevant as this is draft PR, but we already use |
I think those are both great ideas, just switched |
This now opens the starter library when an official starter isn't selected. I do like @pieh's idea of showing a prompt to select a starter when no starter is supplied, though I think having the default starter being used with just a path defined is useful in places like the Quick Start where With the changes in this PR the behavior of entering commands with other combinations of args aren't changed, but resolves the weird error you get when you run |
This is very valid point. Selecting one of starters assume user already have some familiarity with Gatsby. Tho even that could be somewhat resolved with adding more context to selection (something like):
But this isn't hill I want to die on ;) |
The order of selections for starters right now aligns with their popularity of usage. The default starter is the most popular, but maybe because it is just the default when gatsby new is run without a starter given? |
RIP @pieh XD This is awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one is ready to get merged! Great work @gillkyle 💪.
if change reporter.log
in to reporter.info
I would be super happy
Co-Authored-By: Ward Peeters <ward@coding-tech.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 💪 Woop woop, we're merging this one!
Description
This PR would allow the
gatsby new
command with empty args to prompt the user for the path and official starter they'd like to use like this:I added a 4th option where they could select use another option which just exits the command and logs the url to the starter showcase as well:
Some things worth discussing:
Related Issues
Addresses issue #14085