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

Idea: Make --init more powerful by having Taskfile templates #2012

Open
andreynering opened this issue Jan 22, 2025 · 0 comments
Open

Idea: Make --init more powerful by having Taskfile templates #2012

andreynering opened this issue Jan 22, 2025 · 0 comments
Labels
area: ui Changes related to the UI of Task.

Comments

@andreynering
Copy link
Member

From previous discussion in #2010 with @HeCorr. This is an idea for discussion, and we can discard if we think it'd not be worth it.

Our default Taskfile generated from --init is pretty basic. It's basically a skeleton so the user can start adding their own tasks.

In theory we could have some templates for each kind of app: Go, Rust, Ruby on Rails, npm, Yarn, Deno, Docker, etc. IMO they should still be basic, but would help the user by having a starting point.

Implementation wise, we could have a directory in our repository called templates with each template, and have that embed in the binary with go embed. Once --init=rails is called, it'll init with the Rails template, for example (templates/rails/Taskfile.yaml).

Additionally, we could allow the user to override these templates with a directory of his own. Not sure how it'd be more practical, if a CLI flag or an ENV like TASK_EXTRA_TEMPLATES_DIR, but we would merge those with our default templates.

@andreynering andreynering added the area: ui Changes related to the UI of Task. label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Changes related to the UI of Task.
Projects
None yet
Development

No branches or pull requests

1 participant