Skip to content

Conversation

@thechenky
Copy link
Contributor

@thechenky thechenky commented Jun 27, 2019

Description

Make it possible to autogenerate documentation by using TypeDoc on the Functions SDK repo. This version does not depend on the index.d.ts file, but instead uses /src as 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 of functions.analytics.AnalyticsEvent.html it's writing it out as AnalyticsEvent.html. If this is acceptable, I can change the paths in the toc file 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.js from the root directory.

@thechenky thechenky changed the title Add typedoc generation, somewhat working Add automatic TypeDoc generation to Functions SDK Jun 27, 2019
path: /docs/reference/functions/functions.analytics
section:
- title: "AnalyticsEvent"
path: /docs/reference/functions/AnalyticsEvent
Copy link
Contributor Author

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?

@thechenky thechenky requested a review from egilmorez June 27, 2019 06:56
@thechenky
Copy link
Contributor Author

@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.

@thechenky thechenky marked this pull request as ready for review July 9, 2019 23:17
@thechenky thechenky requested review from esmacik and kevinajian July 10, 2019 01:04
@egilmorez
Copy link
Contributor

I have been pulling and trying this out as we go, and right now everything looks fine!

@thechenky
Copy link
Contributor Author

@kevinajian @egilmorez this is now ready for review. I fixed the toc checks, so should now be in final state.

Copy link
Contributor

@egilmorez egilmorez left a 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.

@thechenky thechenky merged commit 0315544 into master Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants