GOV.UK Publishing Components
- Provides shared components for applications
- Provides helpers to generate component payloads
- Provides an application to preview components
Components should be added to this gem if they are required in more than one application, otherwise they should be added to that application.
- Install and use this gem
- Use a component in your application
- Generate a new component
- Develop a component
- Run the component guide
- Move a component from an application to the gem
Architecture / structure
There are 2 types of helper classes in this app:
- AppHelpers. Are exposed to the applications using this gem. They should be documented using RDoc.
- Component Presenters. Anything in these classes is only for use within the components. They should be marked
This gem is the way GOV.UK consumes GOV.UK Frontend, part of the GOV.UK Design System.
node_modules directory. To install GOV.UK Frontend on your machine, run:
You'll need to have installed Node and NPM for this.
Run the documentation locally with:
bundle exec yard server --reload
The default rake task runs all tests:
bundle exec rake
# browser bundle exec rake app:jasmine # command line bundle exec rake app:jasmine:ci