Skip to content

Latest commit

 

History

History
111 lines (75 loc) · 3.52 KB

CONTRIBUTING.md

File metadata and controls

111 lines (75 loc) · 3.52 KB

Contributing

We openly welcome contributions as open source is always better as a team effort. We simply ask that all contributors start by reading this guide.

Table of Contents

Development

Getting Started

The first thing you'll need to do is fork this project. Once that is complete you can run the following script in the directory in which you want to clone this project, replacing <USERNAME> with the Github username in which you forked this repository under.

HTTPS

git clone https://github.com/<USERNAME>/react-frost-core.git
cd react-frost-core
git remote add upstream https://github.com/dogma-io/react-frost-core.git

SSH

git clone [email protected]:<USERNAME>/react-frost-core.git
cd react-frost-core
git remote add upstream [email protected]:dogma-io/react-frost-core.git

Once you've cloned the project with one of the above you can run either yarn install or npm install from the root project directory, depending on which package manager you prefer. At this point you are ready to begin running the development app, running tests, and hacking away to add awesome new features or fix any bugs you come across.

Running

You can run this project using the following commands:

npm

npm run build-app-dev # development
npm run build-app-prod # production

yarn

yarn run build-app-dev # development
yarn run build-app-prod # production

Testing

To run the entire test suite simply run the following command:

npm

npm test

yarn

yarn test

Note: This command runs linting, type checking, and unit tests. If you want to just run one of these you can use the below commands:

npm

$(npm bin)/lintly # linting
$(npm bin)/flow # type checking
$(npm bin)/jest # unit tests

yarn

yarn run lintly # linting
yarn run flow # type checking
yarn run jest # unit tests

After you've run the test suite you can view the code coverage by running:

open coverage/lcov-report/index.html

Pull Requests

Pull requests should be kept as small as possible, fixing a single bug or adding a single piece of functionality. If you plan to address multiple bugs or add multiple features please submit each one in a separate pull request. Before you submit a pull request make sure you adhere to these guidelines:

  1. If you are fixing a bug you should add tests that fail without the fix applied and pass with the fix applied.
  2. If you are adding new functionality you should add full test coverage of the new functionality as well as update the docs as necessary.
  3. The changes in your pull request should be manually verified as well, to ensure there are no visual regressions in any of the major web browsers (Chrome, Firefox, Safari, etc).
  4. Before your pull request is landed all commits in your pull request should be squashed into a single commit.
  5. If this is your first contribution to the project make sure to add yourself to the contributors section of the package.json.

License

By contributing to this project, you agree that your contributions will be licensed under this project's MIT license.