Skip to content

Latest commit

 

History

History
118 lines (84 loc) · 2.86 KB

CONTRIBUTING.md

File metadata and controls

118 lines (84 loc) · 2.86 KB

Contributing to Yet Another React Lightbox

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

Code of Conduct

Yet Another React Lightbox 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>/yet-another-react-lightbox.git
cd yet-another-react-lightbox
git remote add upstream https://github.com/igordanchenko/yet-another-react-lightbox.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 local 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 yet-another-react-lightbox into your local project:
# specify relative or absolute path to yet-another-react-lightbox directory
YARL_HOME=../yet-another-react-lightbox
npm link $YARL_HOME $YARL_HOME/node_modules/react $YARL_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 yet-another-react-lightbox react react-dom

License

By contributing your code to the yet-another-react-lightbox GitHub repository, you agree to license your contribution under the MIT license.