dojo / meta

:rocket: Dojo - meta information for the project.
Other
226 stars 50 forks source link

README and API updates for dojo.io #239

Closed devpaul closed 5 years ago

devpaul commented 6 years ago

To support efforts pulling live documentation from the project sites by dojo.io's doc viewer project README files need to be updated to provide a table of contents and an api.json should be provided. Current work is ongoing in the docs branch and captured in dojo/dojo.io#350.

Documentation

For the README updates, the README.md in the master branch should be updated to include a table of contents to the remaining documentation. Example is in https://github.com/devpaul/core/tree/api and should look something like

<!-- doc-viewer-config
{
    "api": "docs/api.json",
    "pages": [
        "docs/array.md",
        "docs/DateObject.md",
        "docs/has.md",
        "docs/lang.md",
        "docs/load.md",
        "docs/math.md",
        "docs/on.md",
        "docs/request.md",
        "docs/stringExtras.md",
        "docs/UrlSearchParams.md"
    ]
}
-->

dojo.io's docviewer uses this section to generate its table of contents and load in content.

APIs

APIs need to be generated using typedoc. I used @theintern/dev/intern-dev-apis to generate the api.json file. This script needs to be updated to use TS2.6 (the current typedoc uses 2.4) or it can be worked around by adding ignoreCompilerErrors to the options.

Ultimately we want to update grunt-dojo2 to automatically generate api.json as part of the build process like Intern does. But in the short term, we need these api.json files for RC1. It's worth noting that we had previously used typedoc to generate API docs, but ran into issues because typedoc didn't aggressively upgrade their version of TypeScript as fast as Dojo 2 creating lock-in.

Staging

READMEs and APIs can be tested against any repository by updating dojo.io's docsets.json; building and serving the dojo.io project locally.