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.
This repo uses Chromatic
to streamline reviews by publishing your changes online. A link containing your changes is automatically added to pull requests to aid others when reviewing your code. In order for this link to work, please follow these rules when naming your branch:
- Your branch must contain only lowercase letters, numbers and dashes
- Your branch must not exceed 37 characters
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.
yarn version
is available to use to make changes in the CLI. To change the version of the package you are working on run one of the following commands: yarn version major
, yarn version minor
, or yarn version patch
. For guidance on which command to use please see below.
This repo follows semantic versioning. Here are some examples of which changes correspond to which version (MAJOR, MINOR, or PATCH) increase.
- Component is removed
- Component API is changed
- New component is added
- New variant is added for a component
- Accessibility fix
- Styling fix
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.
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
- 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