gulp-load
Load gulp task just like grunt.loadTasks.
Last updated 13 years ago by popomore .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install gulp-load 
SYNC missed versions from official npm registry.

Gulp-load

Build Status Coverage Status

Load gulp task just like grunt.loadTasks.

If you want to load plugins automatically, gulp-load-tasks will be a good choice.


Install

Install gulp-load

$ npm install --save gulp-load

Usage

Require gulp-load in your gulpfile

var gulp = require('gulp');
require('gulp-load')(gulp);

// load tasks from tasks directory and
// dependencies of start with `gulp-` in package.json
gulp.loadTasks(__dirname);

// run tasks which you loaded
gulp.tasks('default', function() {
  gulp.run('your_task');
})

API

Gulp-load will return a function that is same as gulp.loadTasks.

var loadTasks = require('gulp-load')(gulp);
loadTasks === gulp.loadTasks // return true

LoadTasks can load single file.

gulp.loadTasks('path/to/task.js');

LoadTasks can load specified module.

gulp.loadTasks('path/to/module');

LoadTasks can load by module's name. It will lookup from NODE_PATH and node_modules of current module.

gulp.loadTasks('gulp-concat');

If load a module, it will load task from tasks directory of current module, and if gulp plugins (start with gulp-) exists in dependencies of package.json, then it will load each plugin as a module.

License

MIT

Current Tags

  • 0.1.1                                ...           latest (13 years ago)

3 Versions

  • 0.1.1                                ...           13 years ago
  • 0.1.0                                ...           13 years ago
  • 0.0.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE