coterie-ui-library
v1.8.1
Published
`npm install coterie-ui-library`
Downloads
4,828
Readme
Coterie UI Library
npm install coterie-ui-library
Live Website
- https://storybook-ui.coterieinsurancedev.com/
Component Progress
- https://coterieinsurance.atlassian.net/wiki/spaces/FE/pages/61702161/Component+library+progress
How to contribute to the coterie UI library
- Create a branch off of
main
- Push up desired changes
- Create a PR into main
- Add a
major
,minor
,patch
tag depending on the the changes made and semantic versioning - Ask for a review by someone on the front end team
Semantic Versioning
major
use when you make incompatible API changes,minor
use when you add functionality in a backwards compatible mannerpatch
use when you make backwards compatible bug fixes.
Linking coterie UI library for local development
- in
coterie-ui-library
repo run:npm run dev
(you may have to run as sudo). cd
into project that is usingcoterie-ui-library
and runnpm link coterie-ui-library
.- You should now be able to use components in
coterie-ui-library
locally. - Anytime you save in
coterie-ui-library
the package will rebuild and should refresh on the project side to show any changes.
Publishing a Pre-release version
If linking doesn't work (we're having issues at the time of writing this instruction set), you can publish a prerelease version and install it in an app to test changes/fixes.
Run
npm version prepatch --preid alpha
to establish a pre-release versionRun
npm publish
to publish to NPM (note: you'll need write access to publish; you may need to request this from the a senior dev on the team).From here, you can install that pre-release version in the app you want to test, e.g. Dashboard.
If you need to create another prerelease version with new changes, you can run
npm version prerelease
and it will bump the alpha version, e.g.0.1.0-alpha.0
to0.1.0-alpha.1
.- Then you'll have to run
npm publish
to push it to the registry, bump the version in the app you're testing in, and run
npm install` in that app directory to see the changes.
- Then you'll have to run
Obviously, being able to symlink the local build of the coterie-ui-library
into an app such as Dashboard is much more efficient, but this is another solution in the event there are issues with linking.
Running storybook locally
npm run storybook
Local Storybook website will be running on this url: http://localhost:6006/
Releases/Publishes
This repo uses auto
to automatically publish new npn versions and releases when merged into main.
TODOs
- [ ] Add a11y unit test for yes/no component
- [ ] Add a11y plugin for storybook
- [ ] Deploy storybook for public reference
- [ ] pre commit local hook should run unit test before commit