-
Notifications
You must be signed in to change notification settings - Fork 334
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
Spike how we can integrate information from Typedoc in our own docs #5157
Comments
We currently integrate our Sass API doc automatically, so there may be interesting bits to take away from there (thinking of the authoring/reviewing). |
I looked at this very briefly today. The hope is that we can export our js API via typedoc the same way we do with sassdoc. How our sass API is generated via sassdocThis is mainly driven by the How we might generate our JS API via typedocTypedoc has similar functions for specifying an entry point and an output location as json. It looks like it might be a bit more involved though. The cli won't run without a valid config and we don't distribute our one in govuk-frontend. We can either replicate it in the frontend docs or try exporting it. There may be a need to redo some of our paths so the former option might be better, if a bit of a drag. |
UpdateAfter spending all this week tweeking and trying stuff, we managed to finally get a typedoc of govuk-frontend produced from within the frontend docs 🎉 Click here to see the test branch. The main takeaway is that there are a few things we don't export in govuk-frontend that result in typescript raising type errors. Notably we have comments in our code where we ask ts not to emit an error, but these aren't being read in the package because we don't include comments for methods marked as private. Because of this, we were only able to produce a typedoc using typedoc's Additionally, because we don't include which methods are private in our built package, typedoc isn't able to distinguish between public and private methods. Next stepsWe're going to take the following into a more final implementation:
In addition, we're going to further investigate the following:
|
Going to close this spike as the work on it is over. We can look further into this as we tackle #5227 |
What
Spike to discover:
Why
So we can automatically generate part of our API documentation in our docs
Who needs to work on this
Developers, Tech Writers
Who needs to review this
Developers, Tech Writers
Done when
We've identified:
The text was updated successfully, but these errors were encountered: