Skip to main content

Repository: govuk_publishing_components

A gem to document and distribute frontend components for GOV.UK applications

Relevant manual pages

README

status JavaScript Style Guide Stylelint Style Guide

govuk_publishing_components is a Ruby gem to document and distribute components for GOV.UK applications. It provides:

  • a shared library of components
  • helpers to generate component payloads
  • an application to preview components and provide guidance
  • GOV.UK Design System styles and components (via GOV.UK Frontend)

Only add a component to this gem if it is required in more than one application. Please do not add application-specific components to govuk_publishing_components.

All components should meet the accessibility standards for browser and assistive technology support described in GOV.UK Frontend.

Technical documentation

Run the application

./startup.sh

See also Local frontend development.

Run the test suite

bundle install
yarn install
bundle exec rake

Run the JavaScript tests alone

With text-only output to the terminal:

yarn run jasmine:ci

With output viewable in a browser at http://localhost:8888/:

yarn run jasmine:browser

You need to restart the jasmine:browser test server for it to pick up any changes to JavaScript code.

Use the gem

Manage the gem

Make a new component

Further documentation

There is more documentation in the docs directory.

Licence

MIT Licence