@@ -83,34 +83,34 @@ _task "$@"
83
83
84
84
Now after running ` task shorthand ` , your ` task ` commands will get autocompleted.
85
85
86
- ## SubTaskfiles
86
+ ## Splitting Taskfiles
87
87
88
88
Have a (mono)repo with multiple projects, a group of less-used or specialized tasks or just waaay to many tasks for a
89
- single Taskfile? SubTaskfiles might be for you! They allow you to divide your tasks across multiple files while still
90
- (also) calling them from a single one.
89
+ single Taskfile? Splitting your Taskfiles might be for you! This allows you to divide your tasks across multiple files
90
+ while still (also) calling them from a single one.
91
91
92
- There are two flavours , but in both cases tasks from the subTaskfile are called "via" a task in the root Taskfile,
92
+ There are two types , but in both cases tasks from the secondary Taskfile are called "via" a task in the root Taskfile,
93
93
like this: ` ./Taskfile foo <task> <args> `
94
94
95
- ### Full SubTaskfile
95
+ ### Remote Taskfile
96
96
97
- This flavour of subTaskfile is more verbose, but can be used on its own as well. Most useful in (mono)repos where people might
98
- be working on part as often as the whole project.
97
+ This type is more verbose, but can be used on its own as well. Most useful in (mono)repos where people might be working
98
+ in a subdirectory as often as on the project as a whole .
99
99
100
- In the main Taskfile you call the subTaskfile like any other script:
100
+ In the main Taskfile you call the secondary like any other script:
101
101
``` shell
102
102
function task:foo { # # bar
103
- ./path/to/subtaskfile /Taskfile " ${@ -help} "
103
+ ./path/to/secondary /Taskfile " ${@ -help} "
104
104
}
105
105
```
106
106
107
- The subTaskfile is just a regular Taskfile, including utilities like ` task:help ` , ` file:ensure ` and a line with ` task:"${@-help}" `
108
- at the bottom.
107
+ The secondary is just a regular Taskfile, including utilities (semi) optional ones like ` task:help ` , ` file:ensure ` and
108
+ the required line with ` task:"${@-help}" ` at the bottom.
109
109
110
- ### Lean SubTaskfile
110
+ ### SubTaskfile
111
111
112
- This flavour of subTaskfile cannot be called on its own, but has a lot less boilerplate. Most useful for splitting off a
113
- group of tasks that can be logically grouped together, possibly because they are rarely used.
112
+ This type cannot be called on its own, but has a lot less boilerplate. Most useful for splitting off a group of tasks
113
+ that can be logically grouped together, for specific tasks or because they are rarely used.
114
114
115
115
In the main Taskfile:
116
116
``` shell
@@ -125,7 +125,7 @@ function task:foo { ## bar
125
125
126
126
The subTaskfile just needs to contain the tasks and sections you need, but has a few notes:
127
127
``` shell
128
- # Files in the subTaskfile's directory need to be prefixed with $SUB_TASKFILE_DIR
128
+ # When you use files in the subTaskfile's directory, you need prefix them with $SUB_TASKFILE_DIR
129
129
function task:call-script { # # Call a script
130
130
" $SUB_TASKFILE_DIR /some-script.sh"
131
131
}
0 commit comments