gulp-help-doc
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "gulp-help-doc", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Gulp available tasks usage information based on jsdoc-like notations", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,17 +12,19 @@ # gulp-help-doc | ||
const gulp = require('gulp'); | ||
/** | ||
* This simply defines help task which would produce usage | ||
* display. Now we can simply run `gulp help` | ||
*/ | ||
gulp.task('help', () => require('gulp-help-doc')(gulp)); | ||
/** | ||
* We may also link usage as default gulp task, now each type | ||
* simply `gulp` called from comman-line we will see its usage info. | ||
*/ | ||
gulp.task('default', ['help']); | ||
```javascript | ||
const gulp = require('gulp'); | ||
/** | ||
* This simply defines help task which would produce usage | ||
* display. Now we can simply run `gulp help` | ||
*/ | ||
gulp.task('help', () => require('gulp-help-doc')(gulp)); | ||
/** | ||
* We may also link usage as default gulp task, now each type | ||
* simply `gulp` called from comman-line we will see its usage info. | ||
*/ | ||
gulp.task('default', ['help']); | ||
``` | ||
The code above is just defines a way to call for usage information and | ||
@@ -48,24 +50,26 @@ give the power of docblock comments to define what will appear in the | ||
/** | ||
* This is just demo task. What is written here is a task | ||
* description. It can be multiline and written in a fre-form. | ||
* All is required to have this description before @task docblock | ||
* tag. | ||
* | ||
* @task {demo} | ||
*/ | ||
gulp.task('demo', () => {}); | ||
```javascript | ||
/** | ||
* This is just demo task. What is written here is a task | ||
* description. It can be multiline and written in a fre-form. | ||
* All is required to have this description before @task docblock | ||
* tag. | ||
* | ||
* @task {demo} | ||
*/ | ||
gulp.task('demo', () => {}); | ||
/** | ||
* This task runs the tests. This task accept arguments. | ||
* | ||
* @task {test} | ||
* @arg {app} if specified will run tests only for specified app | ||
*/ | ||
gulp.task('test', () => { | ||
let app = require('yargs').argv.app; | ||
let src = './test' + (app ? '/' + app : ''); | ||
/** | ||
* This task runs the tests. This task accept arguments. | ||
* | ||
* @task {test} | ||
* @arg {app} if specified will run tests only for specified app | ||
*/ | ||
gulp.task('test', () => { | ||
let app = require('yargs').argv.app; | ||
let src = './test' + (app ? '/' + app : ''); | ||
gulp.src(src).pipe(require('gulp-mocha')()); | ||
}); | ||
gulp.src(src).pipe(require('gulp-mocha')()); | ||
}); | ||
``` | ||
@@ -95,3 +99,5 @@ As a result when running `gulp help` command from command-line it will | ||
let help = require('gulp-help-doc'); | ||
```javascript | ||
let help = require('gulp-help-doc'); | ||
``` | ||
@@ -118,9 +124,11 @@ This declaration defines a help function which takes 2 arguments: | ||
const help = require('gulp-help-doc'); | ||
const gutil = require('gulp-util'); | ||
```javascript | ||
const help = require('gulp-help-doc'); | ||
const gutil = require('gulp-util'); | ||
gulp.task('help', () => help(gulp, { | ||
lineWidth: 120, | ||
keysColumnWidth: 30, | ||
logger: gutil | ||
})); | ||
gulp.task('help', () => help(gulp, { | ||
lineWidth: 120, | ||
keysColumnWidth: 30, | ||
logger: gutil | ||
})); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130
15770
297