Hello everyone, I'm trying to build a bit complex workflow in gulp 4, essentially I would like to run 5 tasks one after another every time I run the "default" gulp task (see tasks list below); but I have experienced some bugs, if I run them one by one manually, all works good, but if I run the "default" task, it seems gulp going crazy and didn't end all the tasks, it stop at task 4, but the result has no concat inside, and miss completely the task 5, even if in the bash said "finished". I think the problem is the time execution.
1. Task 1: pull vendors from "node_modules/vendor folder" into "src/vendors/pending" (I know isn't necessary pull out vendors, but I have my reasons)
2. Task 2: concat and compressing all js inside "src/vendors/pending" and push into "src/vendors/ready"; concat name result: "vendors.min.js"
3. Task 3: compiling and compressing my es6 script and push into "src/requests/pending"; compiling name result: "main.min.js"
4. Task 4: concat "vendors.min.js" and "main.min.js" and push into "src/request/ready" compiling name result: "frontend.min.js"
5. Task 5: create map and push "frontend.min.js" into "assets/js" folder
gulp.task('default', gulp.series('task1', 'task2', 'task3, 'task4', 'task5' ));
Is there a way to make a task dependent on another and start next task only if the previous task has ended?
I tried wrapping all tasks with a "setTimeout function", and seems to work, but I don't like it very much, I'm looking for something that can run step by step.
Please help me, @Alecaddd and all the comunity