This improves detection of cases where we have:
```js
export const f = function () {};
export const o = { ... };
```
and similarly indirection using default/named.
```js
const f = function () {};
export {f};
```
Fixes#543
* Change document-exported to traverse the code
Instead of traversing over all input files this changes
documentExported to traverse from the exports in the input files,
loading, parsing and traversing the module specifier as needed.
Fixes#515
* Move parseToAst to its own module
* Skip non export declarations for speed
Valid values for the `--sort-order` flag are `"source"` (default) and
`"alpha"`. When set to `"alpa"` the order of the entries in the docs
are sorted alphabetically.
Fixes#534
* Adds test support for flow difference
* New support for FunctionTypeAnnotation
* New support for ObjectTypeAnnotation
* New support for MixedTypeAnnotation
* Add the type property to typedef comments
When using Flow type aliases we didn't add the `type` property
to the JSDoc comment for the inferred `typedef`.
Fixes#516
* Rename files and update test expectations
* Fix issue where exported declarations did not set the kind
For cases like:
```js
/** */ export class C {}
/** */ export function f {}
/** */ export const k = 42;
```
the kind did not get set properly.
Towards #484
* Infer kind for export default too
Towards #484
* 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
This reads the fixture file and looks for
```js
// Options: <JSON>
```
which it uses as the options for documentation.build and
documentation.buildSync.
Also:
* Fixes many issues in the default theme
* Moves the default theme from default-theme to default_theme
* Creates a new, robust linker infrastructure that will support
bare links
* Replaces slugg with github-slugger
* Outputs unknown types as Any. Fixes#451
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.
For example:
```js
/** C */
class C {
/** I'm public */
m() {}
/** I'm private */
_p() {}
}
```
Fixes#436
* Source-sorting by default
Many changes
* Uses a new version of module-deps that exposes a sort key
we use to sort documentation.
* Adds inference for methods in objects
* Groups events into a separate comment property
* Add jsdoc property. Refs https://github.com/documentationjs/documentation/pull/388#issuecomment-215791547
* Namespaces and paths
* More powerful paths: paths now include name, kind, and scope
* comments now include a 'namespace' property with a formatted namespace
* Fix tests
* Re-ignore fonts
* Nix sourceKey from output
* Pin dependency versions
* Fix module-deps-sortable ref
* Update tests for right deps
* Set the `kind` property of the comment, not a property named by the kind.
* Set the `type` property as appropriate for these shorthands.
* Parse @callback as shorthand for @typedef {Function}