@dfedigital/dfe-prototype-kit-plugin
v3.0.0
Published
GOV.UK Prototype Kit plugin for DfE Frontend layouts, macros and admin helpers.
Readme
@dfedigital/dfe-prototype-kit-plugin
Install alongside the GOV.UK Prototype Kit and @dfedigital/dfe-frontend.
Install
npm install @dfedigital/dfe-prototype-kit-plugin @dfedigital/dfe-frontend @dfedigital/dfe-frontend-nunjucks govuk-frontendEnable the plugin via Manage your prototype in the kit, or follow the kit’s plugin installation guidance.
Routes
Register admin routes in app/routes.js:
const registerDfePrototypeRoutes = require('@dfedigital/dfe-prototype-kit-plugin/routes')
registerDfePrototypeRoutes(router)Prototype database (SQLite via sql.js)
The plugin reads .prototype/dfe-prototype.sqlite using sql.js (SQLite compiled to WebAssembly). There is no native sqlite3 / better-sqlite3 dependency.
Apply .prototype/migrations/001_initial.sql to create or update that file (the create-dfe-prototype CLI does this for you, or you can run the SQL manually). Keep the database file out of Git (see .gitignore).
