Yeoman generator for creating modularized Gulpfiles

Usage no npm install needed!

<script type="module">
  import generatorGulpfileModules from '';



npm version Stories in Ready Join the chat at

Yeoman generator for creating modularized Gulpfiles

Fun Facts

Did you know you could break up your gulpfile.js into modules? And with all the hype over modularized code, it stands to reason that we can also apply this approach to Gulp tasks.


I don't know about you, but sometimes my gulpfile's get hefty. Hefty Jeff-level hefty. And so breaking each individual task off into it's own module just makes sense.

I think it also follows Gulp's whole "one task"/simplicity principal.

On top of that, there is an official recipe from the (wonderful) people who develop Gulp.

Enough yammering, wtf is this generator?

This generator will spit out a gulpfile along with the associated task files.

So something like this:

  |- gulpfile.js
  |- gulp/
  |  | // tasks
  |- package.json


You can install by runnning...

npm i -g generator-gulpfile-modules

...and run it via:

yo gulpfile-modules

Check out the current tasks by looking at this folder.

Configuring Paths

This generator does a cool trick to manage your directories. It writes a directories property to your package.json that is read by various gulp tasks. This ensures that if you need to say change the name of a path (like maybe you call your production folder build instead of dist), all you have to do is make the change in your package.json and those changes will be reflected in your Gulp tasks.


Check out the waffle for this project to see what needs to be worked on next! Or file your own pull request if you've got a fix or great idea!

Built by Dave Lunny in the beautiful year of 2015.