- GOV.UK Prototype Kit 13.16.2
- Node.js 20.11.0
- Clone the repository
- Make sure you have the correct version of node.js installed
- Run
npm install
to install dependencies - Run
npm run dev
to start the project
More detailed guidance is available on the prototype docs
To add a milestone, create a folder in app/views
with the name of the milestone (e.g. 'sprint-5'), and either:
- copy over the files needed from the previous sprint, making the changes necessary
- inherit from the file in the previous milestone and overwrite them
Many of the files inherit from previous versions, either in a previous milestone or in the 'extends' folder. These are then called, as necessary, in a later file with the following:
{% extends "../[PREVIOUS MILESTONE]/[FILE NAME]" %}
As the project uses Nunjucks, files can easily be inherited as above. To make changes to the inherted version:
- Create a block in the original file:
{% block BlockName %}
// Code to be overwritten
{% endblock %}
- Overwrite the block in the new file:
{% block BlockName %}
// New code
{% endblock %}
You need to perform a workaround to use the Cloudfoundry CLI with Arm achitecture:
- Create a Rosetta terminal: Navigate to
/Applications/Utilities
in Finder. Right click on Terminal, click 'Duplicate'. Rename this new terminal something helpful, e.g. 'Rosetta Terminal'. Right click on Rosetta Terminal, click 'Get Info' and check the box 'Open using Rosetta' - You will need to have an additional Rosetta version of Homebrew, which will be installed in the default location for an Intel chip. To do this open Rosetta Terminal and install homebrew following instructions on the homebrew website.
- To make it easier to differentiate between the two versions of homebrew, create an alias for the one you have just installed. To do this:
alias ibrew='arch -x86_64 /usr/local/Homebrew/bin/brew'
- Verify that this has worked by typing
alias
. You should see it there. - Run
ibrew install cloudfoundry/tap/cf-cli@8
Rosetta is not installed. To install it, run softwareupdate --install-rosetta
You may get a permissions error on step 5 above. If so, run the following, as recommended in the output:
sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions
. Retry step 5.
If you look back in the version history, you will see it branch off. A large amount of retrospective changes were made, in a branch called clean-start
for several reasons:
- Remove references to Get Into Teaching, where the prototype had originally been copied and pasted from
- Remove other system files and images that were accidentally brought into the repo
- DRY up code
- Update version of the prototype kit to latest version
The master
branch reflects the default branch before the changes, and the main
branch is the default branch after the changes.
The milestones, reflected in the folder structure, should have corresponding tags in both branches.