在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):OverZealous/gulp-task-listing开源软件地址(OpenSource Url):https://github.com/OverZealous/gulp-task-listing开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-task-listingProvides an easy way to get a listing of your tasks from your gulpfile. By default, the output groups tasks based on whether or not they contain a hyphen ( You can optionally override the Regexp used to determine whether a task is a primary or subtask, as well as filter out tasks you don't want to see in the output. UsageInstall using:
Then add it to your gulpfile like so: var gulp = require('gulp');
var taskListing = require('gulp-task-listing');
// Add a task to render the output
gulp.task('help', taskListing);
// Add some top-level and sub tasks
gulp.task('build', ['build-js', 'build-css']);
gulp.task('build-js', function() { ... })
gulp.task('build-css', function() { ... })
gulp.task('compile', ['compile-js', 'compile-css']);
gulp.task('compile-js', function() { ... })
gulp.task('compile-css', function() { ... }) Now run
CustomizationYou can customize the output of the task listing by using the subtaskFilterProviding this allows you to choose which tasks are By default, this is defined as the regular expression If, for example, you wanted to only use colons to determine a task's status, you could set it up like so: gulp.task('help', taskListing.withFilters(/:/)); If you had something more complex, you can use a function, like so: gulp.task('help', taskListing.withFilters(function(task) {
isSubTask = // test task name for sub task properties
return isSubTask;
})); excludeFilterThe exclude filter allows you to remove tasks from the listing. If you want to remove tasks that contain the word gulp.task('help', taskListing.withFilters(null, 'secret')); If you had something more complex, you can use a function, like so: gulp.task('help', taskListing.withFilters(null, function(task) {
exclude = // test task name for exclusion
return exclude;
}));
License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论