Releases: nhsuk/nhsuk-prototype-kit-package
v8.0.1
This is a bug fix release.
🔧 Fixes
- Override start port via
PORTin development – #226 - Fix build options to support all esbuild options – #216
- Fix static asset routing via
/assetsor/images– #229 - Use start port for Browsersync in development – #227
Full Changelog: v8.0.0...v8.0.1
Thanks to @colinrotherham for the fixes, and to @nhsbsa-sthil, @LukeBlacklock-NHS and @edwardhorsford for helping to test them. 🙌
v8.0.0
This is the initial published release of the NHS prototype kit as an npm package.
To use it for a new prototype, it is recommended that you start by using the template repository on GitHub.
If you are upgrading a prototype which used a previous version of the kit, see detailed upgrade guide online.
💥 Breaking changes
The kit is now published as an npm package which can be installed by adding nhsuk-prototype-kit to your package.json file and running npm install.
To then use the kit you need to require it from an app.js file, like this:
const NHSPrototypeKit = require('nhsuk-prototype-kit')
// Local dependencies
const config = require('./app/config')
const sessionDataDefaults = require('./app/data/session-data-defaults')
const filters = require('./app/filters')
const locals = require('./app/locals')
const routes = require('./app/routes')
const viewsPath = [
'app/views/'
]
const entryPoints = [
'app/assets/sass/main.scss',
'app/assets/javascript/*.js'
]
async function init() {
const prototype = await NHSPrototypeKit.init({
serviceName: config.serviceName,
buildOptions: {
entryPoints
},
viewsPath,
routes,
locals,
filters,
sessionDataDefaults
})
prototype.start(config.port)
}
init()🆕 New features
- A more helpful 404 error page if you visit a path which doesn’t match a route or a template.
- A more helpful error page if you have an error in your template
- Password page now has a show/hide button (PR 108)
- The kit now support ES modules as well as CommonJS (PR 106)
- Views can now use the
.njkfile extension, as well as.html(PR #127) - The express-flash middleware is now included as default middleware (PR 160)
v8.0.0-beta.10
Final beta release. 🤞
This one adds a new filters option to make it easier to add custom filters: #204
Also fixes override for the Express.js and Nunjucks environment - #206
Thanks to @colinrotherham for both! 🎉
v8.0.0-beta.9
Another beta release. This one contains a bug fix for commonJS, plus some other small tweaks.
v8.0.0-beta.8
This is the 8th beta release of version 8, for more widespread testing.
This brings back Nodemon for restarting the server on changes, and updates Browser-sync to prevent full page reloading for CSS only changes. Thanks to @colinrotherham for both.
v8.0.0-beta.7
This is the 7th beta release of version 8, for more widespread testing.
Includes a bug fix for the browser-sync watching. Thanks to @roobottom for reporting it!
v8.0.0-beta.6
This is the 6th beta release of version 8, for more widespread testing.
Now updated to use NHS Frontend 10.3.
v8.0.0-beta.5
This is the 5th beta release of version 8, for more widespread testing.
Now includes the express-flash middleware.
v8.0.0-beta.4
This is the 4th beta release of version 8, for more widespread testing.
v8.0.0-beta.3
This is the third beta release of version 8, for more widespread testing.