
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
gulp-task-listing
Advanced tools
Provides 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 (-
), underscore (_
), or colon (:
) in their name.
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.
Install using:
npm i --save-dev gulp-task-listing
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 gulp help
, and you'll see this:
Main Tasks
------------------------------
build
compile
help
Sub Tasks
------------------------------
build-css
build-js
compile-css
compile-js
You can customize the output of the task listing by using the taskListing.withFilters(subtaskFilter, excludeFilter)
method. Both arguments are optional. You can pass in a string, RegExp, or a custom function.
Providing this allows you to choose which tasks are Main Tasks
(by returning false
), and which are Sub Tasks
(by returning true
).
By default, this is defined as the regular expression /[-_:]/
, which means that any task with a hyphen, underscore, or colon in it's name is assumed to be a subtask.
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;
}));
The exclude filter allows you to remove tasks from the listing. If you want to remove tasks that contain the word secret
, you could set it up like so:
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;
}));
Note: setting the first argument to
null
allows you to retain the default behavior for subtask detection.
FAQs
Adds the ability to provide a task listing for your gulpfile
The npm package gulp-task-listing receives a total of 6,054 weekly downloads. As such, gulp-task-listing popularity was classified as popular.
We found that gulp-task-listing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.