We welcome patches to GOV.UK elements, as long as you follow these guidelines:
2-space, soft-tabs only. No trailing whitespace.
govuk_elements
uses standardjs, an opinionated JavaScript linter.
All JavaScript files follow its conventions, and it runs on CI to ensure that new pull requests are in line with them.
To check the whole codebase, run:
npm test
Take a look at the prototype kit documentation on linting.
We use Semantic Versioning.
-
Run the package task (to copy the Sass files from
/assets/sass
to/packages/govuk-elements-sass/public/sass/
)gulp package
-
Open a new pull request with two commits:
The first commit: Commit the changes to the Sass files in the package. Update CHANGELOG.md to summarise these changes.
To see the commits to be summarised in the changelog since the last release, compare the latest-release branch with master.
The second commit:
Propose a new version number in VERSION.txt
and update package.json
with the new version number.
- Once merged into master a new version will be built:
The create-release.sh script will check for an existing tag matching the version number in packages/govuk-elements-sass/VERSION.txt
, if it doesn’t exist, it creates a tag and pushes this to Github.
On a tagged commit, Travis deploys the package to npm.
The contents of /packages/govuk-elements-sass
will be also be released using GitHub Releases using Travis.
Please see our git style guide which describes how we prefer git history and commit messages to read.
The code in GOV.UK elements is built on top of the GOV.UK template and the GOV.UK front end toolkit.
If you find an issue with GOV.UK elements, please raise an issue via this repository.
If you want to suggest changes or raise bugs on code from the toolkit, please do so through its repository, not this one.
There is a Hackpad for Design Patterns for GOV.UK services.