Polaris ViewComponents
Polaris ViewComponents is an implementation of the Polaris Design System using ViewComponent.
Preview
https://polarisviewcomponents.org
Usage
Render Polaris ViewComponents:
<%= polaris_card(title: "Title") do %>
<p>Card example</p>
<% end %>Dependencies
Installation
Add polaris_view_components to your Gemfile:
bundle add polaris_view_componentsRun installer:
bin/rails polaris_view_components:installUpgrade
Check out UPGRADING.md for upgrade instructions.
Development
To get started:
- Run:
bundle install - Run:
yarn install - Run:
bin/dev
It will open demo app with component previews on localhost:4000. You can change components and they will be updated on page reload. Component previews located in demo/test/components/previews.
To run tests:
rakeReleases
The library follows semantic versioning. To draft a new release you need to run bin/release with a new version number:
bin/release VERSIONWhere the VERSION is the version number you want to release. This script will update the version in the gem and push it to GitHub and Rubygems automatically.
To release a new version of npm package update the package.json file with the new version number and run:
npm run releaseAfter that make sure to commit changes in package.json.
Deploy
Before deploying make sure to:
- Copy
demo/config/master.keyfrom 1Password - Set
KAMAL_REGISTRY_PASSWORDin.env
Then run:
kamal deployLicense
The gem is available as open source under the terms of the MIT License.
