Skip to content

Latest commit

 

History

History
102 lines (60 loc) · 3.39 KB

CONTRIBUTING.md

File metadata and controls

102 lines (60 loc) · 3.39 KB

Contributing Guide

Thank you for your help making this project and community as good as it can be. We strive to maintain a welcoming, inclusive space for all. All contributors, including commenters on issues, are expected to abide by our Code of Conduct.

Here are a few things to help your contribution be fun and trouble-free.

Submitting an Issue or Pull Request

We welcome submissions from anyone but before working on a large change, it is best to first to discuss it with the maintainers.

If reporting a bug, please reproduce the issue by forking our Mineral UI Starter and adding the relevant code there. Then, either send us a message on the Flowdock "Mineral & Styleguide" Flow or open a GitHub issue including the relevant link.

PR's should be kept as small and focused, and not include more than one feature or bug fix per PR. Big PRs are hard to review and are less likely to be accepted.

If your PR adds new features or changes existing code, please attempt to write tests covering the new behavior.

If you wish to add a new component, please begin the conversation by either reaching out to us directly or by opening a PR adding a New Component RFC.

For a PR to be accepted, it must fulfill each item in the checklist provided in the pull request template, and all authors must sign the Contributor License Agreement ("CLA").

Getting Started

Fork the repo, then create a new branch from an up-to-date master on your fork.

If you do not have a local repository, clone your fork to your machine and create a new branch:

git clone https://github.com/<yourusername>/mineral-ui.git
git checkout -b your-branch-name

If you do 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/<yourusername>/mineral-ui.git
git checkout master
git pull upstream master
git checkout -b my-branch-name
npm update

Set Up

  1. Install the package dependencies

    npm install
  2. Make sure you’re using the correct node version (we recommend using nvm to install and manage node on your machine)

    nvm use

    If your console tells you that you don’t have that version installed, run

    nvm install
  3. Start the demo

    npm start

Developing

  • We use Prettier, so you can write your code in whichever style you’re most comfortable and convert it to our standard before you commit:

    In the project root:

    npm run format
  • We also use Commitizen for ensuring a standard format for this project’s commit messages. You can still commit as normal with a valid message, but we recommend using:

    npm run commit

Testing

Unit tests use Jest. When appropriate, snaphots are nice.

  1. After making your changes, lint your code and run the unit tests

    npm test

Developer Docs

More detailed information can be found in the Developer Docs.