We are really glad you are reading this, because BOA is a community project. There are multiple ways you can contribute and be a part of the BOA.
If you have found what you believe to be an issue please feel free open an issue on the Issues. When you are creating a new issue please make sure you can explain the issue with a reproducible test case.
Pull requests are always welcome, but, before working on a large change, it is best to open an issue first to discuss it with the maintainers.
Please create a new branch from an up to date master on your fork.
- Fork the boa repository on GitHub.
- Clone your fork to your local machine with
git clone https://github.com/<yourname>/boa.git
. - Create a branch with
git checkout -b my-topic-branch
. - Make your changes, lint, then push to GitHub with
git push --set-upstream origin my-topic-branch
. - Visit GitHub and make your pull request.
If you have an existing local repository, please update it before you start, to minimize the chance of merge conflicts.
git remote add upstream https://github.com/kuveytturk/boa.git
git checkout master
git pull upstream master
git checkout -b my-topic-branch
yarn
To use the provided build scripts with yarn you have to install yarn
. Depending on the package you want to build, just run yarn workspace @kuveytturk/boa-PACKAGE build
.
## start storybook
yarn start
## build base
yarn workspace @kuveytturk/boa-base build
## build components
yarn workspace @kuveytturk/boa-components build
## build utils
yarn workspace @kuveytturk/boa-utils build
Please follow the coding style of the project. BOA uses eslint, so if possible, enable linting in your editor to get real-time feedback. The linting rules can be run manually with the following command yarn lint
.
We are using storybook as the component catalog. To start stroybook, run:
yarn start
Stories are located in the stories folder. The storybook guideline is a good start point to write stories. Also, we have some components that provide convenience to create stories. Header, Preview, PropsTable components can help you to write a story. Each component requires a react-docgen's output. We can provide a script to generate required doc.json. For example, create doc.json for Button.js:
yarn generate:doc --input Button
Please review stories folder before writing a new story.
To run unit tests with mocha on node.js:
yarn test:unit
Code coverage:
yarn test:coverage:html
To run unit test with karma on real browser:
yarn test:karma