Simply run the commands below and you should have a working storybook displaying all of our components.
git clone repo
yarn install
yarn dev
Each component follows the folder structure below:
Exports react component to be consumed
Showcase of component for storybook
Exports a styled component consumed by the react component
When you are ready to publish the package to NPM, use the release.prepare
script:
yarn run release.prepare -m "Commit message" --patch
This script will increment the version number in package.json
based on the specified version type (--patch
, --minor
, or --major
are valid switches). The script will also check in the changes, commit the changes, and create a git tag with the new version number.
After the script runs successfully, you will need to push the tag to Github. Once the tag is pushed, Travis CI will run and publish the package to NPM. This process usually takes 1-2 minutes.
git push origin x.y.z
Where x.y.z is the new version number (part of the script output).
Notes:
patch
will be used by defaulthttps://travis-ci.org/unionco/ts-components
Travis CI runs only when tags are pushed! master/branch commits will not trigger a deploy to NPM.