Skip to content

Latest commit

 

History

History
116 lines (82 loc) · 2.72 KB

CONTRIBUTING.md

File metadata and controls

116 lines (82 loc) · 2.72 KB

Contributing to React Photo Album

First off, thank you for your interest in React Photo Album! All contributions of all sizes are always welcome here. Here are a few guidelines that will help you along the way.

Code of Conduct

React Photo Album has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.

Submitting an Issue

Before committing your time to coding a new feature or fixing a bug, make sure to open a feature request or a bug report in the project's Issues section to ensure that your pull request will be accepted once it is done.

Sending a Pull Request

  1. Fork the repository.

  2. Clone the fork to your local machine and add upstream remote:

git clone https://github.com/<your username>/react-photo-album.git
cd react-photo-album
git remote add upstream https://github.com/igordanchenko/react-photo-album.git
  1. Synchronize your local main branch with the upstream:
git checkout main
git pull upstream main
  1. Install the dependencies with npm:
npm install
  1. Create a new head branch:
git checkout -b feat/my-new-feature
  1. Start the dev server:
npm run dev
  1. Make changes, run tests:
npm run test
  1. Commit and push to your fork (make sure your commit message conforms to the conventional commits):
git commit -m "feat: awesome new feature"
git push -u origin HEAD
  1. Go to the repository and create a Pull Request.

Testing Changes in a Local Project

As an alternative to running the local dev server, you can link-install the library into your local project.

  1. Start the build script:
npm run start
  1. Link-install your locally built react-photo-album into your local project:
# specify relative or absolute path to react-photo-album directory
RPA_HOME=../react-photo-album
npm link $RPA_HOME $RPA_HOME/node_modules/react $RPA_HOME/node_modules/react-dom
rm -rf node_modules/.cache
  1. Make changes, run tests:
npm run test
  1. Cleanup global link:
# execute from your local project directory
npm install
rm -rf node_modules/.cache
npm rm -g react-photo-album react react-dom

License

By contributing your code to the react-photo-album GitHub repository, you agree to license your contribution under the MIT license.