Skip to content
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

Project Installation (create redwood app) Improvements [Tracking Issue] #3989

Open
4 of 8 tasks
thedavidprice opened this issue Dec 22, 2021 · 12 comments
Open
4 of 8 tasks
Labels
topic/crwa create-redwood-app

Comments

@thedavidprice
Copy link
Contributor

thedavidprice commented Dec 22, 2021

In general, there's a lot of room to improve the DX during the installation process. We could have a helpful pre-flight (versions, system, etc), handle failures better (link to docs, prompt for sending error report, etc.), prompt for customization options, add a git init step, use Yarn 3 or pnp to speed up package installation (or find some other way). Here's the working list of related Issues:

@thedavidprice thedavidprice moved this to New in Triage Dec 22, 2021
@jtoar jtoar moved this from New to Todo in Triage Jan 5, 2022
@Tobbe
Copy link
Member

Tobbe commented Jan 9, 2022

add a git init step

I've forever wondered why this wasn't part of the install. I just assumed this was something decided early on, before my involvement. Is there any more background info on this?

@thedavidprice
Copy link
Contributor Author

I've forever wondered why this wasn't part of the install. I just assumed this was something decided early on, before my involvement. Is there any more background info on this?

I originally added it, but Tom and Rob vetoed it. Very up for revisiting!

@thedavidprice
Copy link
Contributor Author

Prompts to consider adding to create:

  • git (user adds commit message)
  • ts or js
  • auth
  • yarn install
  • UI: tailwind or chakra
  • deploy target
  • story and test files generated by default

I do think it's time to remove Listr.

Should revisit final message — shorten and focus, add more flare!

@thedavidprice
Copy link
Contributor Author

Packages to consider:

@jtoar jtoar moved this from Todo to Backlog in Release Apr 15, 2022
@Tobbe
Copy link
Member

Tobbe commented Apr 20, 2022

I ran yarn create remix, and then looked at their code.
They use

  • meow instead of yargs
  • inquirer for prompts
  • ora for progress text + spinners

The remix cli experience for my first install was nice. There were a few things I'd change, but that's for a PR on another repo 😉

Looking at the code however I'm not sure if I like that any better than our current setup with yargs + listr.

@thedavidprice "I do think it's time to remove Listr." What makes you say that?

@thedavidprice
Copy link
Contributor Author

Thanks @Tobbe To be clear, I don't care about the underlying tools. I just think there's a lot we can do to improve the overall experience. Listr can be fine and I'm not specifically saying we remove it. I do think across the CLI we've overused it. So in this case I'd be open to other ideas for managing the step-by-step installation process.

I'd start by adding prompts, which both allow for customization at the time of installation as well as discovery about all the things Redwood can do out of the box.

@jtoar
Copy link
Contributor

jtoar commented Apr 21, 2022

Also noting that we've used prompts in other parts of the codebase but I'm not sure which one is better. And if we were going to consider swapping out yargs (realistically I don't think we will right now / there's probably other optimizations we could do first) I'd want to give clipanion a solid look. It's what yarn uses.

@Tobbe
Copy link
Member

Tobbe commented Apr 21, 2022

Thanks @thedavidprice and @jtoar. I've been happy with both yargs and listr. And totally agree switching out any of our cli tools right now is a lot of work with questionable roi. I won't jump on this now, but I think a good next step for whoever picks this up would be to look at both prompt and inquirer and see if any of them enables us to do something we need that the other one doesn't, and then try to add a couple of questions to the setup process.

@jtoar jtoar added this to Main May 5, 2022
@jtoar jtoar moved this to Backlog in Main May 5, 2022
@jtoar jtoar removed this from Release May 5, 2022
@Tobbe
Copy link
Member

Tobbe commented May 28, 2022

image

See the duplicated Prerendering /blog-post/1 -> web/dist/blog-post/1.html etc lines? It's an issue with Listr.

Tried to find a solution, and found listr2 which over-all seems more actively maintained. But it has the exact same problem listr2/listr2#403. listr2 blames log-update which listr also uses. The listr2 author says that switching to stdout-update is the answer. But that still hasn't happened over a year later. The stdout-update author has written tasktree (that uses stdout-update). So maybe we should look into switching to tasktree instead.

@Tobbe
Copy link
Member

Tobbe commented Aug 27, 2022

From David:

I’ll drop an idea here that I mentioned to Dom a few weeks ago.
Because our engine requirements are tightly coupled to deploy-target support (e.g. no lambdas support 18), people can conceivably do whatever they want. We just need to let them know why. So imaging during the create redwood-app process.

  1. yarn create redwood-app
  2. install checks system versions against engine requirements
  3. if check fails, Prompt =>
  4. Message: Your Node (or yarn) version does not meet Redwood’s supported range X. The requirements are set to match versions supported by deployment providers. We recommend you use versions within range X, but you may proceed with installation using any version — just understand you this may result in unexpected compatibility issues you will need to manage.
  5. Proceed? y/No

Because we now use Yarn 3, I don’t think we even need to clear the package.json engine config. But we might want to take that step given that some deploy providers set the build/deploy Node version based on the engine.

@ehowey
Copy link
Contributor

ehowey commented Nov 20, 2022

Heyo - have any of you tried the Astro CLI installer - WOW! It is really amazing. Nothing more than that, just thought it might be a worthwhile one to checkout and explore.

@pi0neerpat
Copy link
Contributor

I created a topic with my experience setting up Zero-Installs "plug-n-play" here https://community.redwoodjs.com/t/zero-installs-plug-n-play/4519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/crwa create-redwood-app
Projects
Status: Backlog
Development

No branches or pull requests

5 participants