Replies: 2 comments 7 replies
-
I'm confused by what you're asking in relation to the documentation that you link to. From how I read it, it suggests changing from the pattern of having two tasks dependent on The "from" example uses The "to" example gives Or am I misunderstanding what you're asking? |
Beta Was this translation helpful? Give feedback.
-
The task dependency management you describe was just a poor version of exports.test = function(cb) {
async.auto({
clean,
test: ['clean', doTest]
}, cb);
} The entirety of gulp 4 was designed to better work in the larger node ecosystem. You just need to apply the patterns that already exist. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, having been away for while (from the JavaScript ecosystem I mean) I return and many things have changed, which the way things go. I think I can understand the rationale for many changes in v4, like the fact that tasks are now functions: it makes things closer to the wire and probably both easier and more powerful. The only drawback is that we are limited in the naming of tasks by the restrictions in the naming of JS functions, but I guess I can live with that.
OTOH I was very surprised by the disappearing of tasks dependencies management (cf. https://gulpjs.com/docs/en/api/series#avoid-duplicating-tasks). To summarize the example, if I define the clean task as a dependency of 2 independent tasks the clean task will now be executed twice instead of only once (before the first of the 2 independent tasks). To me this is a central feature of any build management framework, implemented by every single one I know of: from the good old Makefile to Grunt going through Ant, MSBuild, Rake, Phing, psake... It seems to me like it puts too much of a burden on the developer to describe complex build scenarios.
Please believe that the goal of this message is not to rant about what was or what is not anymore, but rather to engage in a discussion in order to either:
What are your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions