-
Notifications
You must be signed in to change notification settings - Fork 218
Add automatic TypeDoc generation to Functions SDK #491
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
Conversation
docgen/content-sources/toc.yaml
Outdated
| path: /docs/reference/functions/functions.analytics | ||
| section: | ||
| - title: "AnalyticsEvent" | ||
| path: /docs/reference/functions/AnalyticsEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hiranya911 this seems to work when generating from /src in the functions SDK, but it's not the nice hierarchy that I saw in admin. I'd love for these paths to be namespaced better but I suppose it doesn't matter since these paths just make the links work, right?
|
@egilmorez @hiranya911 this is a work in progress but just wanted to get your take on this and how far away it is from looking ready. Mind taking a look and regenerating the docs on your machine to see if they look right? There's an issue with some links being broken that I can fix. |
|
I have been pulling and trying this out as we go, and right now everything looks fine! |
|
@kevinajian @egilmorez this is now ready for review. I fixed the toc checks, so should now be in final state. |
egilmorez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Diana! Thanks.
Description
Make it possible to autogenerate documentation by using TypeDoc on the Functions SDK repo. This version does not depend on the
index.d.tsfile, but instead uses/srcas the source of truth. Note that the links are currently broken - it looks like the files are getting written out as just the object name instead of the full namespace. So instead offunctions.analytics.AnalyticsEvent.htmlit's writing it out asAnalyticsEvent.html. If this is acceptable, I can change the paths in thetocfile to unnest. I think this is probably from the differences between admin generating their doc from an index.d.ts file that preserves the hierarchies vs us generating from src/ files.Code sample
To generate docs, run
node docgen/generate-docs.jsfrom the root directory.