0.1.10 • Published 8 years ago

gulp-load-params v0.1.10

Weekly downloads
3
License
MIT License (MIT)
Repository
github
Last release
8 years ago

gulp-load-params

view on npm npm module downloads per month Dependency status Build Status Code
Climate Test Coverage

Load gulp task just like grunt.loadTasks and pass parameters through an options object.

Usage

Require gulp-load-params in your gulpfile

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

// load tasks from tasks directory and
// dependencies of start with `gulp-` in package.json
// pass parameters using the options object
var options = { obj: 'obj1'};
gulp.loadTasks(__dirname, options);

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

API

gulp-load-params ⇒ loadTasks

Load gulp task just like grunt.loadTasks and pass parameters through an options object. Returns: loadTasks - loadTasks function

ParamTypeDefaultDescription
gulpObjectThe gulp module
optsObjectoptional options
opts.modulePrefixObject"gulp-"load dependencies that start with this prefix in package.json.
opts.taskPathObject"tasks"load tasks from this directory path.

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

var loadTasks = require('gulp-load-params')(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 loading 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.

documented by jsdoc-to-markdown.

Changelog

License

MIT License (MIT). All rights not explicitly granted in the license are reserved.

Copyright (c) 2015 John Barry

Dependencies

gulp-load-params@0.1.9 - "MIT License (MIT)", documented by npm-licenses.

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago