{"id":22218576,"url":"https://github.com/megahertz/gulp-task-doc","last_synced_at":"2025-07-27T14:32:53.705Z","repository":{"id":57259188,"uuid":"53637778","full_name":"megahertz/gulp-task-doc","owner":"megahertz","description":"Make gulp task documentation (help) easy - just write javascript comments","archived":false,"fork":false,"pushed_at":"2017-03-04T01:42:10.000Z","size":19,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-10T19:20:04.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/megahertz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-11T03:50:45.000Z","updated_at":"2023-10-19T23:36:32.000Z","dependencies_parsed_at":"2022-08-28T21:01:57.202Z","dependency_job_id":null,"html_url":"https://github.com/megahertz/gulp-task-doc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fgulp-task-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fgulp-task-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fgulp-task-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fgulp-task-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/megahertz","download_url":"https://codeload.github.com/megahertz/gulp-task-doc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227812895,"owners_count":17823619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T22:27:10.966Z","updated_at":"2024-12-02T22:27:12.057Z","avatar_url":"https://github.com/megahertz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-task-doc\n[![Build Status](https://travis-ci.org/megahertz/gulp-task-doc.svg?branch=master)](https://travis-ci.org/megahertz/gulp-task-doc)\n[![npm version](https://badge.fury.io/js/gulp-task-doc.svg)](https://badge.fury.io/js/gulp-task-doc)\n\n## Description\n\nPrint gulp task list by reading task comments. Output example:\n\n```bash\n$ gulp help\n[11:25:58] Using gulpfile /www/gulp-task-doc/gulpfile.js\n[11:25:58] Starting 'help'...\nUsage: gulp [task] [task2] ...\n\nTasks:\n   help     Display this help\n   bump     Bump the version\n              --type=pre will bump the prerelease version *.*.*-x\n              --type=patch or no flag will bump the patch version *.*.x\n              --type=minor will bump the minor version *.x.*\n              --type=major will bump the major version x.*.*\n              --version=1.2.3 will bump to a specific version and ignore other flags\n   jscs     Check code style\n   jshint   Analise code quality\n   test     Run tests\n[11:25:59] Finished 'help' after 15 ms\n\n```\n\n## Features\n * Support a separation of gulpfile into multiple files\n * @internal jsdoc-like tag to hide a task from help\n * @verbose jsdoc-like tag to show a task only with a --verbose argument\n * Help output can be customized\n\n## Installation\n\nInstall with [npm](https://npmjs.org/package/gulp-task-doc):\n\n`npm install --save-dev gulp-task-doc`\n\n## Usage\n\n```javascript\nvar gulp   = require('gulp-task-doc'); // Instead of require('gulp');\nvar jscs   = require('gulp-jscs');\n\n// @internal\ngulp.task('default', ['help']);\n\n/**\n * Display this help\n */\ngulp.task('help', gulp.help());\n\n/**\n * Check code style\n * @verbose\n */\ngulp.task('jscs', function() {\n  return gulp.src(jsFiles)\n    .pipe(jscs())\n    .pipe(jscs.reporter());\n});\n\n/**\n * Bump the version\n * --type=pre will bump the prerelease version *.*.*-x\n * --type=patch or no flag will bump the patch version *.*.x\n * --type=minor will bump the minor version *.x.*\n * --type=major will bump the major version x.*.*\n * --version=1.2.3 will bump to a specific version and ignore other flags\n */\ngulp.task('bump', function() {\n  return gulp\n    .src('package.json')\n    .pipe(bump({\n      type: args.type,\n      version: args.version\n    }))\n    .pipe(gulp.dest(__dirname));\n});\n\n```\n\n## Alternative initialization\n\nIf you want to use gulp instead of gulp-task-doc to define tasks you can\nuse a patchGulp method that uses monkey-patching to override a gulp.task method:\n\n```javascript\nvar gulp = require('gulp');\nvar doc  = require('gulp-task-doc').patchGulp();\n\n// Display this help\ngulp.task('help', doc.help());\n```\n\n## Options\n\nCustomize the output by passing a configuration object to the `doc.help()` function.\n\n```javascript\ndoc.help({\n  parser: { // Options for [node-comments-parser](https://github.com/megahertz/node-comments-parser)\n    //...\n  },\n  print: function(tasks, isVerbose) { // Custom print function\n    tasks = tasks\n      .filterHidden(isVerbose)\n      .sort();\n\n    var lines = [\n      'gulp [task]\\n',\n      'Tasks:'\n    ];\n    tasks.forEach(function(task) {\n      lines.push('  ' + task.name);\n      task.comment.lines.forEach( (line) =\u003e lines.push('    ' + line) );\n    });\n    return lines.join('\\n');\n  }\n});\n```\n\n## License\n\nLicensed under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahertz%2Fgulp-task-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegahertz%2Fgulp-task-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahertz%2Fgulp-task-doc/lists"}