Skip to content

Releases: nhsuk/nhsuk-prototype-kit-package

v8.0.1

06 Feb 13:08
220f17d

Choose a tag to compare

This is a bug fix release.

🔧 Fixes

  • Override start port via PORT in development – #226
  • Fix build options to support all esbuild options – #216
  • Fix static asset routing via /assets or /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

03 Feb 13:02
dadace1

Choose a tag to compare

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 .njk file extension, as well as .html (PR #127)
  • The express-flash middleware is now included as default middleware (PR 160)

v8.0.0-beta.10

02 Feb 11:54
743167d

Choose a tag to compare

v8.0.0-beta.10 Pre-release
Pre-release

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

29 Jan 12:20
d69c262

Choose a tag to compare

v8.0.0-beta.9 Pre-release
Pre-release

Another beta release. This one contains a bug fix for commonJS, plus some other small tweaks.

v8.0.0-beta.8

28 Jan 15:34
18a5b64

Choose a tag to compare

v8.0.0-beta.8 Pre-release
Pre-release

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

23 Jan 12:19
ba93e5f

Choose a tag to compare

v8.0.0-beta.7 Pre-release
Pre-release

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

15 Jan 10:19
2ad440a

Choose a tag to compare

v8.0.0-beta.6 Pre-release
Pre-release

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

09 Jan 16:15
223832b

Choose a tag to compare

v8.0.0-beta.5 Pre-release
Pre-release

This is the 5th beta release of version 8, for more widespread testing.

Now includes the express-flash middleware.

v8.0.0-beta.4

22 Dec 15:26
fcc1758

Choose a tag to compare

v8.0.0-beta.4 Pre-release
Pre-release

This is the 4th beta release of version 8, for more widespread testing.

v8.0.0-beta.3

22 Dec 15:02
8f8595d

Choose a tag to compare

v8.0.0-beta.3 Pre-release
Pre-release

This is the third beta release of version 8, for more widespread testing.