schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs, SSR and SSG.
https://jasprpad.schultek.de
MIT License
1.12k stars 68 forks source link

DX improvement: Maybe reduce amount of setup questions for `jaspr create` #271

Closed lucas-goldner closed 3 weeks ago

lucas-goldner commented 3 weeks ago

Description

Hey, this is just a suggestion. When I tried using jasper create again now, I got a bunch of questions for the setup, which is good, but when creating a simple static website, I am not sure if all of them are needed. It is nice to have these options, but maybe moving them to a flag like —advanced-setup would make it easier to get a website set up quickly with only 1-2 questions. I'm trying to think about the DX here, but it's not a big bother. Just something I thought about while creating a new static website 👍🏽

Additional Context

6 Options answered for a static website output:

Select a rendering mode: static: Build a statically pre-rendered site.
(Recommended) Enable automatic hydration on the client? (Y/n) Yes
Setup routing for different pages of your site? (Y/n) Yes
(Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application with client-side routing instead. (Y/n) No
Setup Flutter web embedding? (y/N) No
Enable support for using Flutter web plugins in your project? (Y/n) No
schultek commented 3 weeks ago

I opted for questions rather than templates because they a) make it more clear what the starter project would actually be like and b) give more flexibility.

Since you can create many different types of websites with Jaspr there has to be a certain customization for the starter project in order to make sense for what you want to build.

For devs who don't want to make a concrete decision about the questions, its designed to be "skippable" by just pressing enter and choosing the default for each question.

schultek commented 3 weeks ago

Also the questions are adjusted based on what you selected before. You don't always see all questions.

lucas-goldner commented 3 weeks ago

For devs who don't want to make a concrete decision about the questions, its designed to be "skippable" by just pressing enter and choosing the default for each question.

Ah, okay, this sounds good. I didn't know that. Okay, then, I will close this. Thanks for the response 👍🏽