gp

gulp-param

Add params to your tasks

Showing:

Popularity

Downloads/wk

6.1K

GitHub Stars

27

Maintenance

Last Commit

5yrs ago

Contributors

5

Package

Dependencies

4

Size (min+gzip)

11.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-param

Build Status npm version dependecies codecov.io

It automatically injects commandline arguments into a gulp's task definition arguments.

It accepts parameters after '--'. Parameters without any value will be treated as boolean flag.

gulp build  --myparam 123 --booleanParam

Installation

npm install gulp-param

API

  var gulp = require('gulp-param')(require('gulp'), process.argv);

  gulp.task('dep', function(debug) {
    console.log(debug); // => true
  });

  gulp.task('build', ['dep'], function(debug, tag) {
    console.log(debug); // => true
    console.log(tag); // => 'v1.0.0'
  });

  // $ gulp build --debug --tag v1.0.0

constructor(gulp, cmdArgs, gulpCallbackName): gulp

  • gulp a instance of gulp.
  • cmdArgs arguments from command line. In most cases it would be process.argv
  • gulpCallbackName name of methodargument which will be use to inject async gulp callback. It is an option parameter. If you not defined it a default value would be set to callback
  • returns wrapped gulp instance with enabled param injection.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial