This course has been updated! We now recommend you take the Complete Intro to Real-Time course.

Check out a free preview of the full Real-Time Web with Node.js course:
The "Grunt & Gulp" Lesson is part of the full, Real-Time Web with Node.js course featured in this preview video. Here's what you'd learn in this lesson:

Whether it's minifying code, using JSLint, or any other build task, modules like Grunt and Gulp add automation to these types of build tasks.

Get Unlimited Access Now

Transcript from the "Grunt & Gulp" Lesson

[00:00:00]
>> [MUSIC]

[00:00:04]
>> Kyle Simpson: One other thing I just want to briefly touch on. There were a couple of you that mentioned in the pre event surveys that you were interested in. We're not going to dive much more into this ecosystem, but I do just want to kind of briefly mention so it's sort of you're aware of it.

[00:00:19] There are a couple of tools that you may have heard of that are pretty popular these days. One of them is called Grunt, the other one is called Gulp. And in fact, there's other ones, I think there's one called Broccoli, and some other ones. Essentially what these tools are, are a way to, in the node tooling ecosystem, to run build processes.

[00:00:39] So we all talk about build processes. Things like Browserify, that's a build process. Running a Linter on your code, that's a build process step. Minifying your code, concatenating your code, transpired-
>> Speaker 2: There's a whole course on that.
>> Kyle Simpson: What's that?
>> Speaker 2: David Mosher did a whole course on Grunt.

[00:00:56]
>> Kyle Simpson: Okay, so you should go look at the Frontend Masters videos for build processes, perfect.
>> Speaker 2: [INAUDIBLE]
>> Kyle Simpson: There you go. So we're not going to spend a lot of time talking about it. But I just wanted to orient you to kind of the mindset behind that kind of argument between Grunt and Gulp.

[00:01:16] Grunt is a configuration based approach. So you create a configuration file that specifies, kind of declaratively, the steps that you want to have happen in your build process. And we won't go into exactly the format of it. But Grunt came out before Gulp, long before Gulp, and it got really popular.

[00:01:34] A lot of people provided Grunt files along with their modules. And then Gulp came along and said, what if I don't want to do configuration based? What if I just want to write the code myself? I want to do it explicitly with function calls. So it's a way of dealing with streams and piping and things like that in kind of a very natural node like way, with literally almost no configuration whatsoever.

[00:01:59] They're just, in my opinion, two different sides of the same coin. I don't really think that one is fundamentally different or better. But they're just two different ways to approach the same task, which is we want to express the steps that we need to take in our build processes.

[00:02:13] And if you didn't like any of those, you could go back to using Bash scripts or make files, or any of the thousand other options that are out there. So, I just wanted to share that Grunt and Gulp are kind of node centric tools in that build process environment.

[00:02:35]
>> Kyle Simpson: Several of my little side projects, I still use Grunt. It doesn't mean that Gulp is bad, it just means that I learned Grunt first, so.