nhsuk / nhsuk-prototype-kit-version-one

NHSUK Prototype Kit
https://nhsuk-prototype-kit.herokuapp.com/
MIT License
2 stars 3 forks source link

[NDPE-69] Script assets and page flow examples #22

Closed paul-mitchell-bjss closed 7 years ago

paul-mitchell-bjss commented 7 years ago

As the example prototypes demonstrating page flow required the use of the frontend library's radio button pattern, Javascript support for that pattern had to be added first.

The first commit moves the source code view for the UI library inline, as discussed.

The next commit introduces custom script support to the kit modelled after the custom SCSS support. assets/scripts/app/app.js is provided for user scripting whereas assets/scripts/nhsuk/nhsuk.js is for kit scripting and contains the minimal code necessary to manage the radio button pattern.

Gulp tasks copy the scripts into the /public directory during build. I added a short delay to the BrowserSync config to smooth out the reloading process.

Finally, two example prototypes are added to demonstrate page flow using radio buttons, with "view source" capability added to all the example prototypes.