documentation icon indicating copy to clipboard operation
documentation copied to clipboard

NODE_API.md does not to indicate support for .yml configuration, but I can?

Open lukwallace opened this issue 5 years ago • 1 comments

Was reading the the docs, and wanted to make use of the configuration mentioned here, with the nodejs apis.

But, I couldn't find any mention of it in the nodejs api docs. Had to do some digging into the source to see what was truly available (it is).

Posting this issue here; hoping it might save someone the time in the future, if they're looking to do the same:

var documentation = require('documentation');
documentation.build('src/**', { config: 'documentation.yml' }).then((res) => {

});

^ This seemed to have worked for me.

  • What version of documentation.js are you using?: 12.1.4
  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): Node.js API

lukwallace avatar Jan 14 '20 20:01 lukwallace

Indeed, that's true - what's needed is to add config as an argument in the build method’s jsdoc.

tmcw avatar Jan 17 '20 07:01 tmcw