-
Notifications
You must be signed in to change notification settings - Fork 1k
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): Add TS prompt to Create Redwood App #6360
Conversation
Good feedback - made the requested changes and have done a final test run. From what I can tell it is all working as expected. Thanks for all of the support and guidance on this one Tobbe! Really appreciated! Conversation for another place/thread but I am also going to throw up another "experimental" PR with some of those other ideas we have chatted about just to continue spitballing ideas for improvements to the install experience. |
Excited for this! Now that it's merged I just tried to try it out via
Seems like a simple fix: just add prompts as a dependency to create-redwood-app since it imports prompts. Also my global version of yarn is 3.2.3. It may work on yarn 1 but I haven't confirmed. |
Took like five tries to get the windows tests to pass |
Co-authored-by: Tobbe Lundberg <[email protected]>
Addresses #6275
Continued from #6332 - I got lost in
git reset
hell and just started fresh!Based on the conversation from the previous PR this PR is reduced in scope and achieves the following:
yarn create redwood-app ~/tmp/rw-test388
-> Prompt for TS or JSyarn create redwood-app ~/tmp/rw-test388 --ts
-> No prompt. TS projectyarn create redwood-app ~/tmp/rw-test388 --no-ts
-> No prompt. JS project (or --ts=false, which yargs also gives you for free)A couple of notes:
ts
in Yargs is set to null so that the user is prompted by default, default for the prompt is Y though.--no-ts --no-yarn-install
are used togetheruserArgs
object is a bit of a workaround, but the best way I could think of handling the prompt override based on user input to the command line. If typescript is null, then theuserArgs
ends up being an empty object, which means that the prompt will be shown to the user.