项目作者: shellscape

项目描述 :
Display helpful information for your Gulp tasks
高级语言: JavaScript
项目地址: git://github.com/shellscape/gulp-assist.git
创建时间: 2017-01-06T04:23:20Z
项目社区:https://github.com/shellscape/gulp-assist

开源协议:MIT License

下载


gulp-assist

Display helpful information for your Gulp tasks


:rocket: Are you ready to tackle ES6 and hone your JavaScript Skills? :rocket:

Check out these outstanding ES6 courses by @wesbos


gulp-assist presents basic info registered tasks in a stylish format by extending
gulp with an additional method to describe tasks and their flags. gulp-assist
does not modify existing gulp methods or API.

And info for each individual task including flags and their descriptions.

Install

  1. $ npm install gulp-assist --save-dev

Usage

  1. const gulp = require('gulp');
  2. // initialize the module
  3. require('gulp-assist')();
  4. gulp.task('lint', () =>
  5. // ...
  6. );
  7. gulp.assist('lint', {
  8. desc: 'Analyzes code for errors and convention violations.',
  9. flags: {
  10. src: 'Specifies a directory / module to inspect, within the `src` directory.'
  11. }
  12. });

API

default([options])

options

Example Usage of all options:

  1. const gulp = require('gulp');
  2. let taskName = 'default';
  3. require('gulp-assist')({ gulp, taskName })
gulp

Type: Object
Default: null

The module has the ability to use a gulp instance already required. If this
option is not specified, the module will require gulp internally. In most cases
this will use the shared instance.

taskName

Type: String
Default: 'help'

The name of the task that gulp-assist should use as the entry point.

gulp.assist(taskName, options)

Registers a task with gulp-assist.

options

desc

Type: String
Default: null

A description of the task being registered.

flags

Type: Object
Default: null

An object whose keys represent a flag name. gulp-assist automagically prepends a
double hypen to each flag name when displaying task details. The value for each
key should represent the description of the flag.

License

MIT © Andrew Powell