dispatchrun / dispatch

Entrypoint of the Dispatch ecosystem.
11 stars 1 forks source link

Scaffolding projects with `dispatch init` command #59

Closed chicoxyzzy closed 2 months ago

chicoxyzzy commented 3 months ago

I want to propose a new dispatch init command that can help create a simple templates.

Suggested syntax

dispatch init [template] [options]

[template]

Based on experience, it's usually hard to maintain templates that are coupled to or hardly integrated into the tool code base. I'd propose to use patterns like author/repo on GH (see community template in the create vite repo in the list below).

[options]

TBD. One of possible options could be --local-dev or something like this to create .env file for the local development.

Projects to take inspiration from: create vite — template generator for frontend applications yeoman — "general purpose" template generator

to bee updated

achille-roussel commented 3 months ago

@chicoxyzzy and I chatted, we think the right course of action here is to have a default template repository where we host templates in directories with naming conventions like [lang]-....

A great UX would be for dispatch init --help to retrieve the list of templates available from the default repository.

chicoxyzzy commented 3 months ago

We talked with @chriso and decided that we can skip the implementation of third-party templates for now. We will start with static templates and revisit third-party templates if the need for dynamic generation arises, as otherwise, people can simply use git clone. At the same time, dynamic generation can be difficult to maintain and might lead to breaking changes. It is probably worth adding only if there is a need to add, for example, configuration files using additional flags for dispatch init or some other similar features.