documentationjs / documentationjs/documentation

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

Open
#1,302 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

Was reading the the docs, and wanted to make use of the configuration mentioned [here](https://github.com/documentationjs/documentation/blob/master/docs/CONFIG.md), with the nodejs apis.

But, I couldn't find any mention of it in the [nodejs api docs](https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md). 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.