Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 1.19 KB

moving-components-upstream-into-this-gem.md

File metadata and controls

15 lines (9 loc) · 1.19 KB

Moving components from an application into this gem

Normally you want to build components as close to their point of use, but at some point you will want to share a component between applications.

Try not to move components into this gem 'just in case', only do so when there is a real need.

Example

We originally added some form components into government-frontend which needed to be used in email-alert-frontend.

This meant we moved these components into this gem. You can see how this worked happened with the following PRs. Generally the steps are as follows:

  1. Move the component into the gem (update the namespace from app to gem). Component tests in the gem use rspec, these made need to be updated if the app a component is ported from uses minitest or another test framework.
  2. Release a new version of the gem
  3. Update the application with this version and delete old app component files