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.
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.
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.
-
Fork the repository.
-
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
- Synchronize your local
main
branch with the upstream:
git checkout main
git pull upstream main
- Install the dependencies with
npm
:
npm install
- Create a new head branch:
git checkout -b feat/my-new-feature
- Start the dev server:
npm run dev
- Make changes, run tests:
npm run test
- 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
- Go to the repository and create a Pull Request.
As an alternative to running the local dev server, you can link-install the library into your local project.
- Start the build script:
npm run start
- 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
- Make changes, run tests:
npm run test
- 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
By contributing your code to the react-photo-album GitHub repository, you agree to license your contribution under the MIT license.