README
Component library
This is a monorepo containing two main packages:
react-components
web-components
The core
package is for bundling the two main packages into one for publishing. The storybook
package is for the combined story files from each *-components
package.
Publishing
Updating the version
To publish changes from the react-components
subpackage, make sure the version number in packages/react-components/package.json
and the version number in packages/core/package.json
have been updated to be one ahead of the published versions.
To publish changes from the web-components
subpackage, make sure the version number in packages/web-components/package.json
and the version number in packages/core/package.json
have been updated to be one ahead of the published versions.
How to choose a version number
This repo follows semantic versioning. Here are some examples of which changes correspond to which version (MAJOR, MINOR, or PATCH) increase.
Major
- Component is removed
- Component API is changed
Minor
- New component is added
- New variant is added for a component
Patch
- Accessibility fix
- Styling fix
Releasing
If the version numbers have been updated in master
and you're ready to publish, draft a new release where the tag follows the vX.Y.Z
semantic versioning structure. This tag should match the version found in packages/core/package.json
. Be sure to include good release notes describing the changes - GitHub's autogenerated release notes can be helpful.
Once a release is created, an attempt will be made to automatically publish the package(s) to npm using a GitHub action.
Running Build via Storybook
cd packages/web-components/
yarn install
yarn build
cd ../react-components/
yarn install
yarn build
cd ../core/
yarn install
yarn build
cd ../storybook/
yarn install
yarn storybook
This will allow you to run Storybook locally to view all components
Stencil Dev Server for Testing IE11
- Update
stencil.config.ts
line 16 tobuildEs5: true,
- More information on buildEs5 in Stencil
- Stencil Dev Server is run in
dev
mode
- Within
component-library/packages/web-components/src/index.html
Web Components can be added inside of the<body>
tag for testing- Example:
<body> <va-progress-bar label="Add a label here" percent={35}></va-progress-bar> <va-segmented-progress-bar current={2} total={6}></va-segmented-progress-bar> </body>
- Run
yarn serve
insidepackages/web-components/
to start the Stencil Dev Server