joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Choice of starter on project creation #47

Open kirakik opened 6 years ago

kirakik commented 6 years ago

Suggestion: it would be nice to give a choice of starters to allow users to bootstrap more complete projects using the GUI.

A first version could just include a choice between different Gatsby starters

Eventually, a more complete solution could allow for more customization using an Ignite boilerplate/plugin (will soon support both React & React Native). For example:

This might be out of scope for this project though.

KyleAMathews commented 6 years ago

@sw-yx is working on a new starter showcase for Gatsby https://github.com/gatsbyjs/gatsby/issues/5334

One thing that is coming out of that will be a YAML file with details about each starter. This could be downloaded into Guppy to power a starter selector UI. We've discussed building a GraphQL API for starter info as well in the future but that's pretty tentative and the YAML file should be perfectly sufficient in the meantime.

joshwcomeau commented 6 years ago

Suggestion: it would be nice to give a choice of starters to allow users to bootstrap more complete projects using the GUI.

A first version could just include a choice between different Gatsby starters

Totally agree! I had actually wanted to include this at first, but ultimately I wanted to just ship it and see if the community could help add support for things like that. I imagine rearranging the onboarding a bit so that an icon is chosen before the project type. That way, project type can lead to a new screen that includes a list of possible starters.

Eventually, a more complete solution could allow for more customization using an Ignite boilerplate/plugin (will soon support both React & React Native).

I'm hesitant to go down this road, at least during project initialization. I want to keep the number of choices to a minimum, where the user isn't prompted to make a bunch of choices they may not understand. Starters kinda have to be done right-away, since that's how they work, but things like adding a type-checker can happen whenever, and shouldn't block a project from being created.

I can imagine having another module on the project page, though, for static typing (and any other addons that are valuable). The longer-term vision is for the "Tasks" module to only exist for user-defined scripts; all scripts that come with CRA/Gatsby should have their own little module that can be customized for the task at hand.

One thing that is coming out of that will be a YAML file with details about each starter. This could be downloaded into Guppy to power a starter selector UI. We've discussed building a GraphQL API for starter info as well in the future but that's pretty tentative and the YAML file should be perfectly sufficient in the meantime.

Yay! YAML sounds great, looking forward to it.

AWolf81 commented 5 years ago

OK, I'll have a look at this after finishing the reinstall feature.

I think it should work by adding a Gatsby Starter Selector modal for picking the starter. The starter search can be done similar to the Dependency Search box with Agolia Instant Search.

I would add the button at the end of the creation flow for Gatsby. But that should be no problem to change later.

The data for search & rendering the infos are picked from starter.yml.

I'll check if I can use Gatsby yaml transformer for converting the yml file to json.

In separation of the UI modal. I'll implement project creation with a starter by adding a url in a text input so the project creation is working (with-out the UI for selecting the starter). Maybe I'm starting with this.

This is blocked by PR #292. Or I'm starting a new branch based on branch refactor-project-types. I think the refactoring PR is ready. I'm just waiting for an approving review feedback.

So my implementation steps are like this: