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

Website section with API reference for app #230

Closed
jasonkuhrt opened this issue Jan 6, 2020 · 6 comments
Closed

Website section with API reference for app #230

jasonkuhrt opened this issue Jan 6, 2020 · 6 comments
Labels
type/docs Relates to knowledge transfer matter (refs, guides, tuts, examples, ...)

Comments

@jasonkuhrt
Copy link
Member

jasonkuhrt commented Jan 6, 2020

What

  • Every day docs
  • Dry, succinct
  • Content ideas:
    • type signatures
    • example snippets
    • relevant recipe links
    • relevant guide links

How

  • app
  • Generate JSON representation of api docs
  • build step that transforms JSON content into markdown
  • have website integrate markdown files into site

Related

#210

References

@jasonkuhrt jasonkuhrt added the type/docs Relates to knowledge transfer matter (refs, guides, tuts, examples, ...) label Jan 6, 2020
@jasonkuhrt jasonkuhrt mentioned this issue Jan 6, 2020
9 tasks
@jasonkuhrt
Copy link
Member Author

@Weakky are there any findings from your pass on this issue that you want to share/capture?

We might be able to use or get inspiration from: https://github.com/gcanti/docs-ts.

@Weakky
Copy link
Collaborator

Weakky commented Jan 21, 2020

Open issue on TypeStrong to support our use-case: TypeStrong/typedoc#639

@Weakky
Copy link
Collaborator

Weakky commented Feb 5, 2020

Update: JSON output from typedoc doesn't include type information. We therefore cannot use it for transformations

Update: https://github.com/prisma-labs/jsdoc-extractor repo created

@jasonkuhrt
Copy link
Member Author

Found something quite interesting: https://api-extractor.com/

Via this also found out about https://github.com/microsoft/tsdoc

Trying it out

image

Observations:

  • Does not support namespaced imports, therefore did not work on main package module
  • Did work on /testing module

General Notes

  • They are based upon TSDoc
  • API report concept is nifty, seems like a nice addition to the classical "cover api surface with tests" mantra
  • Taking 10 minutes to read the overview section is worth it, clear concise writing there
  • See an example here of the website generator output
  • See an example here of the markdown generator output
  • release tag concept is very cool and overlaps a bit with some of the vision I had for things Nexus could/would do with its API surface (plugins, too).
  • looks high quality but also like typedoc a bit OOP oriented
  • IIUC the .d.ts rollup feature is not applicable to us because we have multiple entrypoints––but didn't really go into this closely
  • Expect we can learn some nice things from the extractor codebase for ours

Conclusion

  • Overall not sold, weary of taking on such a large tool
  • Believe we can learn a thing or two from its product features (api report, @beta etc.)
  • Believe we can learn a thing or two from its implementation (working with TS API)
  • Believe we should seriously look at TSDoc

@jasonkuhrt
Copy link
Member Author

We have stuff now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Relates to knowledge transfer matter (refs, guides, tuts, examples, ...)
Projects
None yet
Development

No branches or pull requests

2 participants