This repo contains the code for the NHS Prototype kit that will be distributed as an npm package.
The code contains a set of Express middleware and some Nunjucks filters.
The simplest way to get started is to use the NHS Prototype kit template repository.
From there, select 'Use this as a template' and follow the instructions.
You can also add the kit to an existing Express app by running:
npm install nhsuk-prototype-kit
Then, within your app.js
file, add this line to the top:
const NHSPrototypeKit = require('nhsuk-prototype-kit')
and then after your app and nunjucks configuration code, add this:
NHSPrototypeKit.init(app, nunjucksAppEnv)
If you only want to use the Nunjucks filters, you can use this:
NHSPrototypeKit.nunjucksFilters.addAll(nunjucksEnv)