feat(create-app): two-level prompt for framework and variants#2941
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.
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.
I thought it was a simple change, your call then. This was just a small DX improvement.
Co-authored-by: Shinigami <chrissi92@hotmail.de>
|
Just an idea I want to raise here 🙂 This would be a new PR 🙂 |
…#2941) Co-authored-by: Shinigami <chrissi92@hotmail.de>


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