Skip to content

ismyrnow/gulp-modularize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-modularize

Simple, unopinionated gulp task modularization.

Build Status

gulp-modularize allows you to split your gulp tasks into separate modules, enabling task definitions to be resused easily without boilerplate code. It's unopinionated, and requires almost no configuration or setup.

Install

npm install gulp-modularize

Usage

Just point gulp-modularize to your tasks directory, and you're done.

In your gulpfile.js:

// gulpfile.js
require('gulp-modularize')('./tasks/');

Each script in the tasks directory is required, and can add tasks to the global gulp instance.

For example:

// tasks/mytask.js
var gulp = require('gulp');

gulp.task('mytask', function () {
  // do stuff
});

It is up to you to decide how many tasks a module defines, and what they are called.

However, I recommend having each module at least create one task with the same name as the module.

About

Simple, unopinionated gulp task modularization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published