Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 1.31 KB

CONTRIBUTING.md

File metadata and controls

65 lines (48 loc) · 1.31 KB

Contributing

Rainbow button is a React component library written in Typescript using the tsdx toolchain.

Building

# in the root of the repo
yarn
yarn run build

Developing

# in the root of the repo
yarn
yarn start

This will automatically regenerate the library wheny you make changes to it.

Testing

Make sure the tests pass on contributions. Using the linter within your editor will help catch bugs early.

yarn test
yarn lint

Example

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