3
I have a task in Gulp, defined more or less like this:
gulp.task('tarefa', ['a', 'b', 'c'], function () {
console.log("tarefa executada com sucesso");
});
From what I understand of documentation, this code should do the following:
- Set the name task "task";
- Running tasks in parallel "to", "b" and "c";
- After the tasks are completed "to", "b" and "c", execute the logic defined for the task.
What really happens:
- The name task is defined task;
- The tasks "to", "b" and "c" are executed in parallel;
- The program stops, indicating success, but the logic I set for the task task is not executed.
However, I noticed that if in other tasks I receive a parameter, and treat this parameter as a function... For example:
gulp.task('a', function (callback) {
callback();
});
The callback
above is the function I set as task body task.
I would like to run my task only after the others have run, and as they will run in parallel, I cannot use my function as callback of the other tasks.
What I must do?