We use pre-releases when:
- We are working on a new contribution and want to see it in the Design System website
- We want to try an experimental feature as if it's pushed to npm.
This is done by pushing the files used for a GOV.UK Frontend release (the contents of the package
directory) to a new branch which can be installed by npm as if it was a released npm package.
No changes get published to npm as part of the process.
-
Checkout the branch you want to pre-release and pull latest changes.
-
Run
nvm use
to ensure you are using the right version of Node.js and npm. -
Run
npm install
to ensure you have the latest dependencies installed. -
Run
npm run pre-release
. This will create and push a new branchpre-release-[your-branch-name-here]
to GitHub. -
Use the command provided by the script to update other projects to use the pre-release.