在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):chmontgomery/gulp-help开源软件地址(OpenSource Url):https://github.com/chmontgomery/gulp-help开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-help
NOTE: this version only works with gulp 3. For Install$ npm install --save-dev gulp-help UsageBefore defining any tasks, add // gulpfile.js
var gulp = require('gulp-help')(require('gulp')); Next, define help text for each custom task // gulpfile.js
gulp.task('lint', 'Lints all server side js', function () {
gulp.src('./lib/**/*.js')
.pipe(jshint());
}); Now show that help via New task APIgulp.task(name[, help, deps, fn, taskOptions])nameType: helpType: Custom help message as a string. If you want to hide the task from the help menu, supply gulp.task('task-hidden-from-help', false, function () {
// ...
}); However, if the depsType: fnType: taskOptions.aliasesType: List of aliases for this task gulp.task('version', 'prints the version.', [], function() {
// ...
}, {
aliases: ['v', 'V']
}); which results in taskOptions.optionsType: Object documenting options which can be passed to your task gulp.task('version', 'prints the version.', [], function () {
// ...
}, {
options: {
'env=prod': 'description of env, perhaps with available values',
'key=val': 'description of key & val',
'key': 'description of key'
}
}); which results in require('gulp-help')(require('gulp'), options);These are all the options available to be passed to the
LicenseMIT © Chris Montgomery |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论