|
| 1 | +# Welcome to CookieConsent contributing guide |
| 2 | + |
| 3 | +Thank you for investing your time in contributing to this project! |
| 4 | + |
| 5 | +## Documentation |
| 6 | + |
| 7 | +Documentation is available in [cookieconsent/docs](/docs/). |
| 8 | + |
| 9 | +## Getting Started |
| 10 | + |
| 11 | +### Issues |
| 12 | + |
| 13 | +If you encountered a problem, [search if an issue already exists](https://github.com/orestbida/cookieconsent/issues). If no related issues are found, you can [open a new issue via the appropriate issue template](https://github.com/orestbida/cookieconsent/issues/new/choose). |
| 14 | + |
| 15 | +### Make Changes |
| 16 | + |
| 17 | +0. #### Prerequisites |
| 18 | + |
| 19 | + 1. You need to have [node.js LTS](https://nodejs.org/en/download/) installed to test your changes and create the bundled version of the source code. |
| 20 | + |
| 21 | + 2. This project uses `pnpm` to manage the dependencies, which you can install via: |
| 22 | + ```bash |
| 23 | + npm i -g pnpm |
| 24 | + ``` |
| 25 | + |
| 26 | + 3. Follow the [Getting started with Github Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop) guide. |
| 27 | + |
| 28 | +1. #### Make changes locally |
| 29 | + |
| 30 | + 1. [Fork and clone the repository](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-and-forking-repositories-from-github-desktop). |
| 31 | + |
| 32 | + 2. [Create a new working branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository). |
| 33 | + |
| 34 | + 3. Go to the root of the repo and install all dependencies via: |
| 35 | + |
| 36 | + ``` |
| 37 | + pnpm install |
| 38 | + ``` |
| 39 | + |
| 40 | + 4. Make the changes, to see your local changes in action, run: |
| 41 | + |
| 42 | + ``` |
| 43 | + pnpm dev |
| 44 | + ``` |
| 45 | + |
| 46 | + Note: If you're making changes to the documentation, use `pnpm dev:docs`. |
| 47 | +
|
| 48 | + 5. Once you've finished, generate the bundled version via: |
| 49 | + |
| 50 | + ``` |
| 51 | + pnpm build |
| 52 | + ``` |
| 53 | + 6. Make sure tests are all green: |
| 54 | + |
| 55 | + ``` |
| 56 | + pnpm test |
| 57 | + ``` |
| 58 | + |
| 59 | +3. Push the changes and [create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). |
| 60 | + |
| 61 | +### Pull Request (PR) |
| 62 | + |
| 63 | +1. When creating a new PR, explain briefly what it improves/fixes so that we can easily understand your changes. |
| 64 | +2. Don't forget to [link existing issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue), if you're solving one. |
| 65 | +3. Enable the [allow maintainer edits](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) checkbox so that the branch can be updated for a merge. |
| 66 | +4. We may ask questions or require changes before a PR is merged. |
| 67 | +5. If everything is clear and sorted out, your PR will be merged! Congratulations 🎉! |
| 68 | + |
| 69 | +#### Note: feature requests |
| 70 | + |
| 71 | +Before creating a feature requests, make sure you "are on the same page" as the maintainer, so that your efforts don't get rejected! A feature request might be rejected if there is no related issue/discussion. |
| 72 | +
|
| 73 | +## Thanks! |
| 74 | +
|
| 75 | +Once your PR is merged, your contribution will be available in the next release! |
| 76 | +
|
| 77 | +## Questions? |
| 78 | +
|
| 79 | +If you have any questions, feel free to [open a new discussion](https://github.com/orestbida/cookieconsent/discussions/new/choose)! |
0 commit comments