alphagov / govuk-frontend-docs

Technical documentation for GOV.UK Frontend
https://frontend.design-system.service.gov.uk/
36 stars 11 forks source link

Automatically generate JavaScript API Reference from JSDoc #216

Open 36degrees opened 2 years ago

36degrees commented 2 years ago

What

Once we're happy with the format and location, we should work out how to automatically generate the JavaScript API Reference from JSDoc at build time, rather than hand-writing it and manually keeping it in sync with the JSDoc in the code.

Why

Automatically generating the JavaScript API Reference from the JSDoc avoids duplication of effort and ensures that the API reference will always be in sync with the code in the most recently published release.

Who needs to know about this

Developers, tech writer

Done when

36degrees commented 2 years ago

https://github.com/jsdoc2md/jsdoc-to-markdown looks like it might be useful for this

stevenjmesser commented 1 year ago

@colinrotherham Did we add JSDoc to Frontend meaning this can now be closed?

colinrotherham commented 1 year ago

@stevenjmesser It's half done! This issue represents step 2

We're currently using TypeDoc to render our JSDoc documentation https://govuk-frontend-review.herokuapp.com/docs/javascript/

But similar to the Sass API reference we may want to generate a branded public facing JavaScript API reference too

36degrees commented 1 year ago

API Extractor looks like it might be useful for this.