Rainbow button is a React component library written in Typescript using the tsdx
toolchain.
# in the root of the repo
yarn
yarn run build
# in the root of the repo
yarn
yarn start
This will automatically regenerate the library wheny you make changes to it.
Make sure the tests pass on contributions. Using the linter within your editor will help catch bugs early.
yarn test
yarn lint
See ./example code for an simple implementation example that is deployed to rainbow-me.github.io/rainbow-button/.
To run the example locally, you can do the folliwing:
# in the root of the repo
yarn
# build rainbow-button library
yarn build
cd example
rm -rf node_modules yarn.lock dist
yarn
yarn start
Note: This copies the locally built rainbow-button into example/node_modules
. If you would like to modify rainbow-button
and have the changes relfected automatically in the running example, you need to link rainbow-button
with rainbow-botton/example
.
# in the root of the repo
yarn
yarn link
yarn watch
In another console
cd example
yarn
yarn link @rainbow-me/rainbow-button
yarn start