Skip to content

Node API documentation example for HTML incorrect #642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bhoriuchi opened this issue Dec 28, 2016 · 1 comment
Closed

Node API documentation example for HTML incorrect #642

bhoriuchi opened this issue Dec 28, 2016 · 1 comment
Labels

Comments

@bhoriuchi
Copy link

bhoriuchi commented Dec 28, 2016

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) {
@tmcw
Copy link
Member

tmcw commented Dec 28, 2016

Thanks for spotting that! I've updated the Node API documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants