Socket
Socket
Sign inDemoInstall

gulp-parameterized

Package Overview
Dependencies
109
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-parameterized

Parameterize gulp tasks


Version published
Weekly downloads
157
decreased by-22.66%
Maintainers
1
Install size
2.97 MB
Created
Weekly downloads
 

Changelog

Source

v0.1.1 (2016-11-28)

Documentation

  • Fix mistakes in README examples

Readme

Source

npm Version Build Status Coverage Status Dependency Status devDependency Status Code Climate Codacy Badge

gulp-parameterized

Parameterize gulp tasks.

NOTE: REQUIRES GULP 4.0

See CHANGELOG for latest changes.

Installation

npm install --save-dev gulp-parameterized

Usage

You can accept parameters in a task by wrapping the task function in parameterized():

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

gulp.task('hello', parameterized(function(cb, params) {
  console.log('hello ' + params.name + '!');
  cb();
}));

You can then pass parameters to a task on the command line:

$ gulp hello --name world
[23:43:51] Using gulpfile ~/hello-example/gulpfile.js
[23:43:51] Starting 'hello'...
hello world!
[23:43:51] Finished 'hello' after 1.98 ms

Use parameterized.series() and parameterized.parallel() instead of gulp.series() and gulp.parallel() if you want to call another task in your gulpfile and pass parameters to it:

gulp.task('hello-world', parameterized.series('hello --name world'));

gulp.task('hello-gulp', parameterized.series('hello --name gulp'));

You can then invoke the hello-gulp task on the command line:

$ gulp hello-gulp
[23:49:38] Using gulpfile ~/hello-example/gulpfile.js
[23:49:38] Starting 'hello-gulp'...
[23:49:38] Starting 'hello'...
hello gulp!
[23:49:38] Finished 'hello' after 1.28 ms
[23:49:38] Finished 'hello-gulp' after 4.91 ms

License

MIT

Keywords

FAQs

Last updated on 28 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc