- Ensure that your app uses a node-based (i.e.
package.jsonexists) asset pipeline with Tailwind and esbuild. (TODO: Check whether other JS bundlers work)- You can create a new app that's set up correctly by passing
-j esbuild -c tailwindtorails new - Or, you can use
cssbundling-railsandjsbundling-railsto installtailwindandesbuildrespectively.
- You can create a new app that's set up correctly by passing
- Add the CfA UI Components gem by adding
gem "cfa_ui_components", github: "codeforamerica/cfa-ui-components"to yourGemfile, and runbundle install - Run
bin/rails g cfa_ui_components:install
- Make local changes
- Run
gem build cfa_ui_components.gemspec && gem install cfa_ui_componentsto build the gem & install it locally - In your Rails app,
- Modify the Gemfile to use the locally-installed cfa_ui_components gem.
gem "cfa_ui_components"
- Run
bundle update cfa_ui_components - Ensure that you switch the Gemfile back to github & update again before merging your PR.
- Modify the Gemfile to use the locally-installed cfa_ui_components gem.
Run bin/dev and navigate to localhost:3000