https://github.com/loginov-rocks/gulpdoc
Documentation generator for Gulp tasks
https://github.com/loginov-rocks/gulpdoc
doc documentation generator gulp tasks
Last synced: 2 months ago
JSON representation
Documentation generator for Gulp tasks
- Host: GitHub
- URL: https://github.com/loginov-rocks/gulpdoc
- Owner: loginov-rocks
- License: mit
- Created: 2018-01-14T14:27:34.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-03-13T12:17:22.000Z (over 5 years ago)
- Last Synced: 2025-09-20T14:57:02.636Z (9 months ago)
- Topics: doc, documentation, generator, gulp, tasks
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gulpdoc
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulpdoc
[](https://www.npmjs.com/package/gulpdoc)
[](https://github.com/loginov-rocks/gulpdoc/actions/workflows/ci.yml)
[](https://github.com/loginov-rocks/gulpdoc/actions/workflows/cd.yml)
Documentation generator for Gulp tasks.
## Quick Start
### Install
Locally to use in code:
```sh
npm install gulpdoc
```
Or globally to use in shell:
```sh
npm install -g gulpdoc
```
### Use
For example your javascript files containing Gulp tasks are located in the `./gulp/` directory relative to the current.
Annotate Gulp tasks with `@gulptask` (case insensitive) and place descriptions like this:
```js
/**
* Gulp task described in block comment before the annotation.
* @gulptask example:block
*/
gulp.task('example:block', function() {
// Insanely useful actions.
});
```
```js
// @gulptask example:line Gulp task described in line comment on the annotation line.
gulp.task('example:line', function() {
// Insanely useful actions.
});
```
#### Сode
```js
const gulpdoc = require('gulpdoc');
const tasks = gulpdoc.getTasks('./gulp/*.js');
console.log(tasks);
// Output:
// [ Task { name: 'example:block', description: 'Gulp task described in block comment before the annotation.' },
// Task { name: 'example:line', description: 'Gulp task described in line comment on the annotation line.' } ]
```
#### Shell
```sh
gulpdoc ./gulp/*.js
```
or
```sh
gulpdoc -s ./gulp/*.js -d ./gulpdoc.md -a gulptask
```
Where `-s` is source, `-d` is destination and `-a` is annotation.
It'll make following `gulpdoc.md`:
> * `gulp example:block` - Gulp task described in block comment before the annotation.
> * `gulp example:line` - Gulp task described in line comment on the annotation line.
## API
### `Gulpdoc`
Gulpdoc class.
**Kind**: global class
* [Gulpdoc](#gulpdoc-1)
* [getTasks(pattern, [annotation], [options]) ⇒ Array.<Task>](#gettaskspattern-annotation-options--arraytask)
---
#### `getTasks(pattern, [annotation], [options])` ⇒ `Array.`
Get tasks.
**Kind**: static method of `Gulpdoc`
**Returns**: `Array.`, where `Task` object contains `name` and `description` properties
| Parameter | Type | Default | Description |
| ------------ | -------- | ------------ | ------------ |
| pattern | `string` | | Glob pattern |
| [annotation] | `string` | `'gulptask'` | Annotation |
| [options] | `Object` | `{}` | Glob options |