Before you can submit a Pull Request you'll need to do the following:
-
Fork the repository on GitHub
-
Clone your fork
git clone https://github.com/<your_username>/react-a11y.git
cd react-a11y- Install for development
npm installLint the code:
npm run lintRun the tests:
npm run mocha // run tests using mocha only
npm run karma // run tests using karma only
npm run test // run tests using both mocha and karmaBuild the code:
npm run build- Checkout a new branch and name it accordingly to what you intend to do
git checkout -b <branch_name>- Make your intended changes, being sure to run the tests and lint the code.
- Commit your changes (please make commits small and commit messages descriptive):
git commit -m "..."- Push to your github repo:
git push origin <branch_name>- Go to the GitHub page and click "New Pull request".
- Write a good description of the change.
After sending a pull request, other developers will review and discuss your change. Please address all the comments. Once everything is all right, one of the maintainers will merge your changes in.
These steps are for maintainers only and can be disregarded by contributors.
For publishing use the following workflow:
-
Make sure all code changes for this new version have already been committed.
-
Update the CHANGELOG.md by using the following command, double check the content and save (don't commit):
npm run changelog -- -t <the upcoming version>where <the upcoming version> refers to the version number that you are preparing to publish
- Update the version and publish. This is done by running one of the following scripts:
npm version:patch # for a patch version update i.e. v1.0.0 -> v1.0.1
npm version:minor # for a minor version update i.e. v1.0.0 -> v1.1.0
npm version:major # for a major version update i.e. v.1.0.0 -> v2.0.0After running one of the above version:* scripts the following things will take place in this order:
-
the
preversionscript will run which does the following:-
The tests will be run and the entire process will halt if they do not all pass
-
A check will be performed to validate that the
CHANGELOG.mdhas been updated and it is the only uncommitted change in the repo. If this check fails the process will be halted.
-
-
the selected
version:*script will run which does the following:- The version in
package.jsonwill be incremented as requested (patch, minor, major). Because the--no-git-tag-versionflag is specified this script will not yet include tagging and committing in the github repo.
- The version in
-
the
postversionscript will be run which does the following:-
A
git commitwill be made including only thepackage.jsonandCHANGELOG.mdfiles. It will include a commit comment in the format of: "Version $npm_package_version" -
Performs a
git tagin the format of "v$npm_package_version" -
Performs a
git pushandgit push --tags -
Runs
npm publish
-