Angular Automation: Gulp Tasks

InstructorLukas Ruebbelke

Share this video with your friends

Send Tweet

In this lesson, we will learn how tasks work in Gulp. We will talk about how to define a task and what each parameter in the definition does. We will see how task dependencies work and talk about how to handle asynchronous issues using run-sequence.

Hedge
~ 9 years ago

Why not using the built-in piping mechanism?

Lukas Ruebbelkeinstructor
~ 9 years ago

Good question! Gulp does a pretty good job synchronizing asynchronous dependent tasks when you provide the enough async tasks hints. Things get wonky when the tasks are non-dependent and so this is where run-sequence comes in. You can read more about here https://www.npmjs.com/package/run-sequence.

Hedge
~ 9 years ago

Thanks. Found out many developers use this 'run-sequence' module. Though I'm still not sure how it's different from the gulp recipe described here: running-tasks-in-series.md I mean - what situation does it solve?

Lukas Ruebbelkeinstructor
~ 9 years ago

In recipe above, all the tasks are dependent on each other. You would use run-sequence to orchestrate non-dependent tasks.

Hedge
~ 9 years ago

Found it:

The built-in task dependency functionality does not solve this scenario. Dependent tasks are always run: there's no built in way to run two tasks in a row some of the time, but not every time. run-sequence solves a critical piece of missing functionality in gulp. by the dev of run-sequence himself

Scott C
~ 8 years ago

Does the latest run-sequence not require a callback? Request: could you perhaps make an angular2 gulp tutorial?

Lukas Ruebbelkeinstructor
~ 8 years ago

@Ryan, I believe that run-sequence still requires a callback (https://www.npmjs.com/package/run-sequence). Also, bear in mind that once Gulp 4.0 hits, there should no longer be a need for run-sequence (as stated by the authors themselves in the above link). As for a Gulp-Angular2 tutorial, that is a great suggestion that we will be adding to the queue!

Paul
~ 8 years ago

Your tutorials are fantastic Lukas. Not rushed and step by step. Keep up the good work. With some of the other trainers, I feel there's a rush to cram as much information as possible in as little time as possible. It would be interesting to know your WPM vs other trainers. They should aspire to you and John Lindquist. Actually, Ken Dodds is pretty good too.

Lukas Ruebbelkeinstructor
~ 8 years ago

Thanks, Paul! Appreciate the kind words!

~ 8 years ago

Please pause after typing a command. The video cuts over quickly after you type a command and I find myself going back and pausing the video to see what the command was. I have been doing jQuery web 2.0 work for years and this new super heavy IDE platform set up is taking me a while to get used to. Your videos help but it seems there are assumptions of having prior knowledge about tools like npm and I am copying down the commands and the gulp scripting for reference. Is there any way to get a sample app or a text of the commands used in this course? I would rather have a static reference document and focus on listening than to constantly go back and pause and type my own notes. Thanks

Lukas Ruebbelkeinstructor
~ 8 years ago

Great feedback! I will try to be more mindful of my timing. As for the sample app, everything is in the Github repo. Hope that helps!

kel
~ 7 years ago

Will a course like this come out for angular4/angular4cli ?