Skip to content

Node API documentation example for HTML incorrect #642

Closed
@bhoriuchi

Description

@bhoriuchi

the Node API Documentation example for HTML does not supply an error in the callback for documentation.formats.html

the current example is

var documentation = require('documentation');
var streamArray = require('stream-array');
var vfs = require('vinyl-fs');

documentation.build(['index.js'], {}, function (err, res) {
  documentation.formats.html(res, {}, function(output) {
    streamArray(output).pipe(vfs.dest('./output-directory'));
  });
});

and should be

var documentation = require('documentation');
var streamArray = require('stream-array');
var vfs = require('vinyl-fs');

documentation.build(['index.js'], {}, function (err, res) {
  documentation.formats.html(res, {}, function(err, output) {
    streamArray(output).pipe(vfs.dest('./output-directory'));
  });
});

where the corrected line is

  documentation.formats.html(res, {}, function(err, output) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions