-
-
Notifications
You must be signed in to change notification settings - Fork 635
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
Inherit all/some tasks from included file #572
Comments
Hi @fgblomqvist, thank you for the feature request. I could see it being useful to select which tasks are included from files. It could prevent polluting the task list if you have a utility Taskfile that you include in many of your other Taskfiles. includes:
util:
taskfile: "../util/Taskfile.yml"
include: [clean, install]
tasks:
setup:
- task: util:clean
- task: util:install Are you also suggesting the ability to inline certain tasks to remove the parent namespace? This has been suggested before in #273 includes:
util:
taskfile: "../util/Taskfile.yml"
include: [clean, install]
inline: true
tasks:
setup:
- task: clean
- task: install |
Ah yes my bad, I did not find that one when I looked before posting this. That is indeed pretty much what I was looking for 🙂 . But yeah having the ability to only import certain tasks could also be useful in combination. |
Since this is a duplicate of #273 I'm closing this one. |
In my shared Taskfiles, I have two types of tasks:
Right now I can include a Taskfile by doing something like (the extended format):
However, in order for the user to be able to use the first-degree shared tasks I still have to redeclare them:
This is tedious and can result in a lot of boilerplate.
Therefore, I think it would be handy to be able to directly inherit some/all of the tasks from an included file.
It could look like this:
or if you only want to inherit some of the tasks:
And then a user would be able to just call
task install
which would execute a task that would be equivalent to:However, inside the taskfile, you'd still have to use the namespace:
Any thoughts?
The text was updated successfully, but these errors were encountered: