Skip to content

Node API documentation example for HTML incorrect #642

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy