-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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(create-app): two-level prompt for framework and variants #2941
Conversation
Nice! Do you think there will be other variants in the future? I was thinking we could use a yes/no question for TypeScript if not. Maybe interesting to think about JSX for vue. In that case we would have four variants if we want to include that option, or two yes/no questions. Typescript? Yes/no, JSX? Yes/no |
Frankly, I don't know 😅. Just think variants could be more general. With JSX/TSX, we will have 4 variants, I guess maybe it's still ok. We can think about it when we have like 10 items-ish? |
message: 'Select a variant:', | ||
choices: frameworkInfo.variants.map((v) => ({ | ||
name: v.name, | ||
value: v.name, |
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.
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.
Well, I actually noticed and tried, but haven't found a way to make enquirer work that way. Might need to hack it a bit?
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 thought it was a simple change, your call then. This was just a small DX improvement.
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.
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.
🎉
Co-authored-by: Shinigami <[email protected]>
Just an idea I want to raise here 🙂 This would be a new PR 🙂 |
…#2941) Co-authored-by: Shinigami <[email protected]>
Description
As we are growing rapidly, we are now having 12 templates for users to choose from. As half of them are TypeScript variants and we might have more in the future. This PR introduces two-level prompts to make it simpler and future-proofing - one for frameworks, and one for variants.
From
To:
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).