-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Milestone
Description
The new syntax does allow inline nested subtasks. While this is not common, it's desirable in some cases. Before we could do something like:
var myTask = {
name: 'my-task',
tasks: [
{
name: 'inline-task',
tasks: [
// ...
]
}
]
}I suggest something like:
module.exports = function (task) {
task
.name('my-task')
.do(function (options, ctx, next) {
var inlineTask = ctx.task()
.name('inline-task')
.do(/** ... */)
.do(/** ... */;
next(null, inlineTask);
});
};This even allows to create a inline task asynchronously.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Reactions are currently unavailable