Sha256: 1d40601d3759a1fa0e5d551d6e0a77fe63ddaffc5c715e143c2f0094e86b6444

Contents?: true

Size: 1.99 KB

Versions: 37

Compression:

Stored size: 1.99 KB

Contents

# GOV.UK Publishing Components

This gem:

- 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.

![Screenshot of component guide](docs/screenshot.png)

## How to

- [Install and use this gem](/docs/install-and-use.md)
- [Use a component in your application](/docs/use-components.md)
- [Generate a new component](/docs/generate-a-new-component.md)
- [Develop a component](/docs/develop-component.md)
- [Run the component guide](/docs/run-component-guide.md)
- [Move a component from an application to the gem](/docs/moving-components-upstream-into-this-gem.md)

## Architecture / structure

![](https://docs.google.com/drawings/d/e/2PACX-1vRj6JM7cQvngDl3Gr_U9G4xga2gsU7Z-d2qHHQcsBdjsW4WaC9_eQdryBJIS69cLkrY7S0fK9BcrPSF/pub?w=960&h=720)

[Source](https://docs.google.com/drawings/d/1N8-kbyCN_xOvvshN6d2HnQz5i5Bqed2WIatI3Nj9gNQ/edit)

There are 2 types of helper classes in this app:

- [AppHelpers](lib/govuk_publishing_components/app_helpers). Are exposed to the applications using this gem. They should be documented using RDoc.
- [Component Presenters](lib/govuk_publishing_components/presenters). Anything in these classes is only for use within the components. They should be marked `@private`.

## Documentation

[See the rubydoc.info documentation](http://www.rubydoc.info/gems/govuk_publishing_components)

Run the documentation locally with:

```
bundle exec yard server --reload
```

## Running tests

The default rake task runs all tests:

```
bundle exec rake
```

Javascript is tested using Jasmine and the [Jasmine gem](https://github.com/pivotal/jasmine-gem). Tests can be run either in the browser or on the command line via the dummy app’s tasks:

```sh
# browser
bundle exec rake app:jasmine

# command line
bundle exec rake app:jasmine:ci
```

## Licence

[MIT Licence](LICENCE.md)

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
govuk_publishing_components-9.3.6 README.md
govuk_publishing_components-9.3.5 README.md
govuk_publishing_components-9.3.4 README.md
govuk_publishing_components-9.3.3 README.md
govuk_publishing_components-9.3.2 README.md
govuk_publishing_components-9.3.1 README.md
govuk_publishing_components-9.3.0 README.md
govuk_publishing_components-9.2.3 README.md
govuk_publishing_components-9.2.2 README.md
govuk_publishing_components-9.2.1 README.md
govuk_publishing_components-9.2.0 README.md
govuk_publishing_components-9.1.1 README.md
govuk_publishing_components-9.1.0 README.md
govuk_publishing_components-9.0.1 README.md
govuk_publishing_components-9.0.0 README.md
govuk_publishing_components-8.2.0 README.md
govuk_publishing_components-8.1.0 README.md
govuk_publishing_components-8.0.1 README.md
govuk_publishing_components-8.0.0 README.md
govuk_publishing_components-7.3.0 README.md