govuk-prototype-kit
govuk-prototype-kit copied to clipboard
Allow plugins to create routes
Context
The Home Office kit plugin is designed to help make designers job easier, providing useful functionality that helps in prototype creation. Often our prototypes are quite complex internal systems, so we've found somethings helpful, for example adding routes to log session data, or having the current date easily available to display on any page.
This functionality can be configured using the global config.json
so I've also introduced some functionality to be able to read the config that's specific to the Home Office kit, including adding default values where appropriate.
Alternatives
I'm currently including the routes file in the filters
property of govuk-prototype-kit.config.json
.
Related issues
https://github.com/alphagov/govuk-prototype-kit/issues/2031 - access config.json to determine if in development mode or not