You want to help? You rock! Now, take a moment to be sure your contributions make sense to everyone else.
Found a problem? Want a new feature?
- See if your issue or idea has already been reported.
Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits.
- To begin, fork this project, clone your fork, and add our upstream.
# Clone your fork of the repository into the current directory
git clone https://github.com/<your-username>/common-components
# Navigate to the newly cloned directory
cd common-components
#Assign the forked repository to a remote call "origin"
git remote add origin git://github.com/<your-username>/common-components.git
# Assign the original repository to a remote called "upstream"
git remote add upstream https://github.com/quran/common-components
# Install the tools necessary for development
yarn install
# or via NPM
npm install
- Pull latest changes from "upstream" and push these changes to your "origin"(forked)
NOTE - This step will repeat every time you plan to contribute
# Pull latest changes from "upstream" repository
git pull upstream master
# Push latest changes to Your "origin" repository
git push origin master
- Create a branch for your feature or fix:
# Move into a new branch for a feature
git checkout -b feature/thing
# Move into a new branch for a fix
git checkout -b fix/something
- Be sure your code follows our practices.
# Test current code
npm run test
# Ensure you meet our linting rules
npm run lint
Our npm run test:watch
tests and watch.
You can run npm run lint:fix
which will fix all eslint errors.
- Running our demo page.
We use the awesome react-story!
npm run start
- To create a PR you need to push your branch to the origin(forked) remote and then press some buttons on GitHub:
# Push a feature branch
git push -u origin feature/thing
# Push a fix branch
git push -u origin fix/something
This will create the branch on your GitHub project. The -u
flag links this branch with the remote one, so that in the future, you can simply type git push origin
.
- Now open a pull request with a clear title and description.