-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix(remix-dev/cli): Remove excess fetching and improve error handling #2500
Conversation
Instead of fetching early to detect template types, we can simplify the code and speed up the setup process with a few heuristics.
can you cut an experimental when you get time? looks great 👌 |
Co-authored-by: Logan McAnsh <logan@mcan.sh>
@mcansh Cut before I committed your suggested change, but you can test everything else w/ |
@@ -305,7 +305,8 @@ export async function run(argv: string[] = process.argv.slice(2)) { | |||
templateType! || (answers.appType === "stack" ? "repo" : "template"), | |||
projectDir, | |||
remixVersion: flags.remixVersion, | |||
installDeps: flags.install ?? answers.install, | |||
installDeps: flags.install || answers.install, | |||
useTypeScript: flags.typescript || answers.useTypeScript, | |||
useTypeScript: flags.typescript ?? answers.useTypeScript, |
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.
heh oops, the commit suggestion didn't let me remove the previous useTypeScript
🤦
and appTemplate needs to be updated to ||
as well :oof:
import inquirer from "inquirer"; | ||
// import chalkAnimation from "chalk-animation"; |
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.
Could you remove this dep from the lockfile and package.json so we can close #2547?
Hmm.. just noticed that Any chance we can get those back in the CLI? It's nice knowing what version I'm going to be installing. |
Once we get this merged, I'm going to be doing a bit more work in the CLI too. I may bring back the animated thing as well. |
looks like 1.3.3 dropped the "welcome" message and 1.3.0 dropped the version and animation when we did some reshuffling - hoping to bring both back soon enough |
sweet! i loved that little touch |
yes please!! 🙌 |
Note about the animation: I like it as well but it creates some noise for screen-reader users. Want to make sure we ensure that the --no-color flag is respected there. |
I'm going to get this across the line. Just putting it into |
…#2500) Co-authored-by: Logan McAnsh <logan@mcan.sh>
…#2500) Co-authored-by: Logan McAnsh <logan@mcan.sh>
Instead of fetching early to detect template types in the CLI, we can simplify the code and speed up the setup process with a few heuristics:
Worth noting that there are probably more opportunities to improve error handling. We'll want to iterate here.