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 understood from documentation , this code should do the following:
- Set the task to ;
- Run the jobs , "b" and "
- After completing the "a", "b" and "c" tasks, execute the defined logic for the task. / li>
What really happens:
- The task name task is set;
- The "a", "b" and "c" tasks run in parallel;
- The program for, indicating success, but the logic I set for the task task is not executed.
However, I noticed that if in the 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 that I defined as the task body task .
I would like to run my task only after the others have run, and as they will run in parallel, I can not use my function as a callback for the other tasks.
What should I do?