You'll need Git and Node.js installed to get this project running.
Note: You will need the Node.js version specified in the .nvmrc file. This should reflect the most current active LTS (Long-term support).
If you're an external contributor make sure to fork this project first
git clone git@github.com:alphagov/govuk-frontend.git # or clone your own fork
cd govuk-frontend
If you work across multiple Node.js projects there's a good chance they require different Node.js and npm versions.
To enable this we use nvm (Node Version Manager) to switch between versions easily.
- install nvm
- Run
nvm installin the project directory (this will use .nvmrc)
We use npm to manage the dependencies in development.
npm install
If you've previously installed govuk-frontend locally using Node v14 or earlier, you may see node-sass-related errors when updating to Node v16.
To get rid of these errors, delete the node_modules folder, then run:
nvm use
npm uninstall node-sass -g && npm cache clean -force && npm install node-sass
npm install
This will build sources, serve pages and watch for changes.
npm start
You can deploy your project straight to a Heroku instance.
An existing Heroku instance can be found at: http://govuk-frontend-review.herokuapp.com/