mxl / gulp-interactive

Gulp interactive prompt.
MIT License
0 stars 0 forks source link
gulp gulp-friendly interactive prompt

npm Build Status David semantic-release

gulp-interactive

Gulp interactive prompt.

Install

$ npm install --save-dev gulp-interactive

Usage

gulpfile.js

var gulp = require('gulp')
var interactive = require('gulp-interactive')

interactive();

gulp.task('build', function(cb) {
  cb();
});

Shell

Launch interactive prompt:

$ gulp prompt
[01:37:56] Using gulpfile ~/gulp-interactive-example/gulpfile.js
[01:37:56] Starting 'prompt'...
? Enter gulp task name:

Then enter task name:

? Enter gulp task name: build
[01:38:05] Finished 'prompt' after 9 s
[01:38:05] Starting 'build'...
[01:39:05] Finished 'build' after 15 μs
[01:39:05] Starting 'prompt'...
? Enter gulp task name:

Enter :q to exit prompt.

? Enter gulp task name: :q
[01:39:09] Finished 'prompt' after 4 s

API

interactive(options)

options

Type: Object

repeatOnEnter

Type: boolean
Default: false

Repeat last executed task by simply pressing Enter.

taskName

Type: string
Default: prompt

Gulp task name that starts interactive prompt.

License

See the LICENSE file for details.