Idea: Make --init
more powerful by having Taskfile templates
#2012
Labels
area: ui
Changes related to the UI of Task.
--init
more powerful by having Taskfile templates
#2012
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 withgo 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.The text was updated successfully, but these errors were encountered: