8000 GitHub - documentationjs/gulp-documentation at 2cb89e46c162c35cdb764812024791b627ff5d8b
[go: up one dir, main page]

Skip to content

documentationjs/gulp-documentation

Repository files navigation

gulp-documentation

Circle CI

Use gulp with documentation to generate great documentation for your JavaScript projects.

name description
options output options
options.format either 'html', 'md', 'json', or 'docset'
options.filename custom filename for md or json output

Returns stream.Transform

Installation

$ npm install --save-dev gulp-documentation

Example

var gulpDocumentation = require('gulp-documentation'),
    gulp = require('gulp');

/**
 * Out of the box, you can generate JSON, HTML, and Markdown documentation
 */
gulp.task('documentation', function () {

  // Generating README documentation
  gulp.src('./index.js')
    .pipe(gulpDocumentation({ format: 'md' }))
    .pipe(gulp.dest('md-documentation'));

  // Generating a pretty HTML documentation site
  gulp.src('./index.js')
    .pipe(gulpDocumentation({ format: 'html' }))
    .pipe(gulp.dest('html-documentation'));

  // Generating raw JSON documentation output
  gulp.src('./index.js')
    .pipe(gulpDocumentation({ format: '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', function () {

  gulp.src('./src/*.js')
    .pipe(gulpDocumentation({ format: 'md' }))
    .pipe(gulp.dest('md-documentation'));

});

About

Use gulp with documentation to generate great documentation for your JavaScript projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 8

0