gulp-load-params

0.1.10 • Public • Published

gulp-load-params

view on npm npm module downloads per month Dependency status Build Status CodeClimate 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

Param Type Default Description
gulp Object The gulp module
opts Object optional options
[opts.modulePrefix] Object "gulp-" load dependencies that start with this prefix in package.json.
[opts.taskPath] Object "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

Type ID Summary
Version: 0.1.10 - released 2016-02-16
Non-functional MDGPLOAD-16

Package: Update package dependencies

Version: 0.1.9 - released 2015-11-13
Non-functional MDGPLOAD-15

Package: Update package dependencies

Version: 0.1.8 - released 2015-08-25
Non-functional MDGPLOAD-14

Package: Update development dependencies and configure for travis-ci

Version: 0.1.7 - released 2015-05-24
Non-functional MDGPLOAD-13

Package: Update development dependencies

Version: 0.1.6 - released 2015-05-21
Non-functional MDGPLOAD-12

Package: remove dependency on underscore.js

Version: 0.1.5 - released 2015-03-07
Non-functional MDGPLOAD-11

Package: Update package dependencies

Non-functional MDGPLOAD-10

Package: Update eslint configuration, test.js runner and dev dependencies

Non-functional MDGPLOAD-9

Package: Update eslint configuration, test.js runner and dev dependencies

Non-functional MDGPLOAD-8

Package: Migrate from jshint to eslint static code analysis

Version: 0.1.4 - released 2014-10-11
Non-functional MDGPLOAD-7

Package: Add option to provide an alternate lookup path for gulp tasks

Non-functional MDGPLOAD-6

Package: Remove all gulp tasks except 'test'

Version: 0.1.3 - released 2014-08-27
Non-functional MDGPLOAD-5

Package: Update dependencies.

glob  ^3.2.7 latest 4.0.5

Version: 0.1.2 - released 2014-08-27
Non-functional MDGPLOAD-4

Package: Migrate to new Cellarise Package Manager.

Version: 0.1.1 - released 2014-08-25
Bug MDGPLOAD-3

Package: Fix tasks in gulp packages overriding tasks in primary module.

Version: 0.1.0 - released 2014-08-25
Feature MDGPLOAD-2

Develop a gulp task loader with parameters

As a developer I can load gulp tasks automatically and pass them parameters So that I can simplify my build scaffold and process

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.

Readme

Keywords

Package Sidebar

Install

npm i gulp-load-params

Weekly Downloads

3

Version

0.1.10

License

MIT License (MIT)

Last publish

Collaborators

  • cellarise