mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
* Add a flag to document all exported bindings
This adds a boolean flag called `document-exported` (defaults to false)
that effectively adds an empty comment to all exported bindings that do
not already have a JSDoc comment. It also does the same for the
members of exported classes and objects.
```js
export class C {
method() {}
}
```
Both `C` and `C#method` are now part of the generated documentation.
Related to #424
* Fix lint error
* Rebase and use options pragma in test file
* Create extractor type as a generalized comment/export getter
* Document exported extractor
18 lines
401 B
JavaScript
18 lines
401 B
JavaScript
var walk = require('../lib/walk');
|
|
|
|
module.exports = function (comments) {
|
|
return walk(comments, function (comment) {
|
|
var hasGithub = !!comment.context.github;
|
|
var path = comment.context.path;
|
|
comment.context = {
|
|
loc: comment.context.loc
|
|
};
|
|
if (hasGithub) {
|
|
comment.context.github = '[github]';
|
|
}
|
|
if (path) {
|
|
comment.context.path = path;
|
|
}
|
|
});
|
|
};
|