# gulp-documentation

> documentation plugin for gulp

Latest version **3.2.1** (published 2017-08-11) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install gulp-documentation
pnpm add gulp-documentation
yarn add gulp-documentation
bun add gulp-documentation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.1 |
| Published | 2017-08-11 |
| First published | 2015-04-10 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 64 |
| Author | Tom MacWright |
| Maintainers | tmcw |
| Keywords | documentation, gulp, gulpplugin, jsdoc |

## Links

- npm: https://www.npmjs.com/package/gulp-documentation
- Repository: https://github.com/documentationjs/gulp-documentation
- Homepage: https://github.com/documentationjs/gulp-documentation#readme
- Issues: https://github.com/documentationjs/gulp-documentation/issues
- npm.io page: https://npm.io/package/gulp-documentation

## Dependencies (2)

- [vinyl](https://npm.io/package/vinyl.md) ^2.1.0
- [through2](https://npm.io/package/through2.md) ^2.0.3

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 3.2.1 (latest) — 2017-08-11
- 3.2.0 — 2017-04-10
- 3.1.0 — 2016-12-07
- 3.0.0 — 2016-11-10
- 2.2.0 — 2016-02-10
- 2.1.0 — 2015-12-02
- 2.0.1 — 2015-11-11
- 2.0.0 — 2015-11-03
- 1.0.1 — 2015-04-10

## README

# gulp-documentation

[![Circle CI](https://circleci.com/gh/documentationjs/gulp-documentation.svg?style=shield)](https://circleci.com/gh/documentationjs/gulp-documentation)
[![Greenkeeper badge](https://badges.greenkeeper.io/documentationjs/gulp-documentation.svg)](https://greenkeeper.io/)

Use [gulp](http://gulpjs.com/) with
[documentation](https://github.com/documentationjs/documentation)
to generate great documentation for your JavaScript projects.

## Installation

```sh
$ npm install --save-dev gulp-documentation
```

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### documentation

Documentation stream intended for use within the gulp system.

**Parameters**

-   `format` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** format - one of 'html', 'md', or 'json' (optional, default `md`)
-   `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** documentation options - the same as given to [documentation](https://github.com/documentationjs/documentation)
    -   `options.filename` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** custom filename for md or json output
-   `formatterOptions` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** output options - same as given to documentation
    -   `formatterOptions.name` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** if format is HTML, specifies the name of the project

**Examples**

```javascript
var gulpDocumentation = require('gulp-documentation');
var gulp = require('gulp');
//  Out of the box, you can generate JSON, HTML, and Markdown documentation
gulp.task('documentation-readme-example', function () {
  // Generating README documentation
  return gulp.src('./index.js')
    .pipe(gulpDocumentation('md'))
    .pipe(gulp.dest('md-documentation'));
});

// Generating a pretty HTML documentation site
gulp.task('documentation-html-example', function () {
  return gulp.src('./index.js')
    .pipe(gulpDocumentation('html'))
    .pipe(gulp.dest('html-documentation'));
});

// Generating raw JSON documentation output
gulp.task('documentation-json-example', function () {
  return gulp.src('./index.js')
    .pipe(gulpDocumentation('json'))
    .pipe(gulp.dest('json-documentation'));
});

// Generate documentation for multiple files using normal glob syntax.
// Note that this generates one documentation output, so that it can
// easily cross-reference and use types.
gulp.task('documentation-multiple-files', function () {
  return gulp.src('./src/*.js')
    .pipe(gulpDocumentation('md'))
    .pipe(gulp.dest('md-documentation'));
});


// If you're using HTML documentation, you can specify additional 'name'
// and 'version' options
gulp.task('documentation-html-options', function () {
  return gulp.src('./src/*.js')
    .pipe(gulpDocumentation('html', {}, {
      name: 'My Project',
      version: '1.0.0'
    }))
    .pipe(gulp.dest('html-documentation'));
});

// Document non-JavaScript files with JSDoc comments using polyglot: true
gulp.task('documentation-for-cplusplus', function () {
  return gulp.src('./src/*.cpp')
    .pipe(gulpDocumentation('html', { polyglot: true }, {
      name: 'My Project',
      version: '1.0.0'
    }))
    .pipe(gulp.dest('html-documentation'));
});
```

Returns **[stream.Transform](https://nodejs.org/api/stream.html#stream_class_stream_transform)**

---
_Source: https://npm.io/package/gulp-documentation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
