Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs command #350

Open
davewasmer opened this issue Jun 20, 2017 · 1 comment
Open

Docs command #350

davewasmer opened this issue Jun 20, 2017 · 1 comment

Comments

@davewasmer
Copy link
Collaborator

Denali's documentation lives with it's source code - the guides and API docs alike. Since we have everything to generate the docs in the locally installed package, why not do it?

In addition, if we can agree on some kind of JSON structure to describe docs, we could allow addons to generate their own docs as well. This would vary based on source language (i.e. Typescript would use typedoc, Babel would use jsdoc, etc).

This would allow the user to run $ denali docs and a browser tab would open with all the docs for their own app (denali + their unique set of addons + the app itself, if they have documented any of it), offline and versioned.

@davewasmer
Copy link
Collaborator Author

Actually - we don't need to set a standard for docs content. We can have the root project that the docs command is run from generate a wrapper page with an iframe that just has "package" navigation (i.e. a dropdown listing denali, all the addons supplied, etc). The CLI can just invoke something like builder.toDocsTree() on each package's builder class, namespacing the results under the package name, i.e.:

docs-output/
  index.html    <- wrapper page with iframe and package nav
  denali/
    index.html
    ... the usual denali docs ...
  denali-auth/
    index.html
    ...
  my-app/
    index.html

This way we don't need to maintain cross-version support for a single doc standard, and each package could even theme or visually structure their own docs differently. We'll just provide default implementations for the popular languages (Typescript, Babel).

Basically all the docs command does is provide a hook for each package to supply it's own broccoli builders, and a wrapper page to navigate between them.

@davewasmer davewasmer added this to the v0.2.0 milestone Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant