This course has been updated! We now recommend you take the AWS for Front-End Engineers (ft. S3, Cloudfront & Route 53) course.

Check out a free preview of the full Zero to Production Node.js on Amazon Web Services course:
The "Alternatives & Friends of Grunt" Lesson is part of the full, Zero to Production Node.js on Amazon Web Services course featured in this preview video. Here's what you'd learn in this lesson:

Two alternative task runners to Grunt are Gulp and Webpack. Gulp leverages streams which can be faster and has a more code-like syntax as opposed to Grunt’s configuration file. Webpack, which integrates with Grunt tends to add more frontend features and is less of a general-purpose task runner.

Get Unlimited Access Now

Transcript from the "Alternatives & Friends of Grunt" Lesson

>> [MUSIC]

>> Kevin Whinnery: So the last bit before I turn you loose on some scripting tasks, which I'm kind of weird in that command line scripting is my favorite part of Node. I love to do stuff on the command line, I don't know what my problem is. There's lots of alternatives out there.

[00:00:19] We already started talking about some of them. Gulp is probably the other major one. The big advantage of Gulp over something like Grunt is the fact that it uses the Node JASS streams interface to stream data from one plugin to another. So that you don't have to wait for one task to be completely finished before you can start streaming data to another task.

[00:00:47] And that is really cool, and it does speed things up oftentimes quite a lot, but again, old man Kevin kind of thinks it's harder to reason about how streams work. And write custom tasks that execute in the order that I expect using the streaming interface. So I did Gulp for a long time, and then I kinda found myself coming back to Grunt again.

[00:01:11] Not because it's bad, just because my simple mind was able to comprehend what was going on in Grunt a little bit more easily. But it's super fast, and it also has a very nice ecosystem of tools. I think Grunt's been around longer, so I think there's probably more out there for Grunt.

[00:01:28] But Gulp probably is cooler at this point. So there's maybe more new stuff being invented for Gulp these days. Webpack is a tool that's out there that some folks have kind of used as a front end for executing tasks, like for compiling their front end assets. And it's really awesome, it does a lot of really cool stuff.

[00:01:52] It's got really cool plugins. The way that you would implement those cache buster URLs that I was talking about briefly earlier, I think the easiest way to do it is with Webpack through Grunt. So there's lots of really great uses for it, but I think it's not necessarily as good of a general purpose task runner as Grunt is.

[00:02:16] Like I said, we use Grunt for all kinds of stuff, from deployed tasks to just simple scripting stuff. And that's not really what Webpack is for, so using Webpack from Grunt, I think, is the winning combo for me. Yeah, we have another question?
>> Speaker 2: Yeah, what happens if you don't define default task in the Grunt file?

>> Kevin Whinnery: If you don't define a default task and you just run Grunt, it will say that there's no default task defined and it'll error out. That's what'll happen if you don't have a default defined.