Follow the steps below to set up the repository to be run locally.
The main
branch is automatically deployed via Github Actions to pebble.istreamplanet.net.
$ yarn
$ yarn start
$ yarn test
Although not strictly enforced, we aim for 100% unit test coverage for each component.
$ yarn cover
Pebble uses Chromatic and Storybook for visual regression testing. Each push to the build service will run the Chromatic service. If there are visual changes detected in any component story, a maintainer will be required to review and approve/deny the difference in the Chromatic App.
To run Chromatic on a local build, get Pebble's Chromatic app code and run the following command.
$ yarn chromatic --app-code=<your-app-code>
For more information, see the Chromatic Documentation.
Otherwise, Chromatic will run automatically when you push to a remote branch.
$ yarn styleguide
$ yarn storybook
$ yarn styleguide:build
Package releases should be done through the following commands:
release a patch update
$ npm version patch -m "release package %s because reasons"
release a minor update
$ npm version minor -m "release package %s because reasons"
or for an alpha pre-release minor update
$ npm version pre-minor -m "release package %s as alpha because reasons" --preid=alpha
The following will then happen
- Execute a coverage test run to make sure everything is okay
- Bump the version number in
package.json
accordingly (see examples) - Add a tag in git with that version number
- Push to git origin including tags
From there the CI machine takes over and for every tagged commit the following happens
NPM publish
is run, this in turn will trigger ourprepack
that cleans and builds the package- The newly minted package is published with the
next
tag. This is done to preventprerelease
packages from being installed by default.
To promote the new package to the latest
tag and make it the preferred default install:
- Log into with
npm login [username]
but if rumors are true, that could increase a lot in the future. - Apply the latest tag
npm dist-tag add @istreamplanet/pebble@[version number] latest