LandRegistry / hmlr-frontend

HM Land Registry frontend styles
https://hmlr-frontend.herokuapp.com
MIT License
5 stars 0 forks source link

Generate macro-options.json and fixtures.json from YAML #4

Open ahosgood opened 2 years ago

ahosgood commented 2 years ago

GOV.UK frontend uses YAML files to detail their components and then generate the necessary macro-options.json and fixtures.json for each component from those files.

YAML: https://github.com/alphagov/govuk-frontend/blob/v4.3.1/src/govuk/components/header/header.yaml

Resultant files:

ahosgood commented 1 year ago

Maybe use something like https://www.npmjs.com/package/yaml to parse the YAML as part of a Node script?