|
| 1 | +# @frsource/cypress-plugin-visual-regression-diff Contributing Guide |
| 2 | + |
| 3 | +Hey! It’s really exciting for us to see your interest in contributing to this library. Before taking off with your work, please take a moment to read through these guidelines: |
| 4 | + |
| 5 | +- [Code of Conduct](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/blob/master/CODE_OF_CONDUCT.md) |
| 6 | +- [Questions?](#questions) |
| 7 | +- [Reporting an issue or a feature request](#reporing-an-issue-or-a-feature-request) |
| 8 | +- [Pull Request Guidelines](#pull-request-guidelines) |
| 9 | +- [Development Setup](#development-setup) |
| 10 | + |
| 11 | +## Questions? |
| 12 | + |
| 13 | +Don’t hesitate to ask a question directly on the [discussions board](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/discussions)! |
| 14 | + |
| 15 | +## Reporting an issue or a feature request |
| 16 | + |
| 17 | +- Please always use GitHub Issues tracker with [appropriate template](https://github.com/login?return_to=https%3A%2F%2Fi.8713187.xyz%2FFRSOURCE%2Fcypress-plugin-visual-regression-diff%2Fissues%2Fnew%2Fchoose) to create a new issue or suggestion |
| 18 | + |
| 19 | +## Pull Request Guidelines |
| 20 | + |
| 21 | +- Check if there isn’t a similar PR already in the [GitHub Pull requests](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/pulls) - maybe somebody already has covered this topic? |
| 22 | + |
| 23 | +- Checkout the master branch and (after you do your work) file a PR against it |
| 24 | + |
| 25 | +- Read through the [development setup](#development-setup) to learn how to work with this project. Always make sure that `yarn lint`, `yarn build` and `yarn test` pass |
| 26 | + |
| 27 | +- Please use [conventional commits v1.0.0 style guide](https://www.conventionalcommits.org/en/v1.0.0/) for commits and PR names |
| 28 | + |
| 29 | +- We have no preference about number of commits on the PR - they will be all squashed by GitHub while merging |
| 30 | + |
| 31 | +- When creating a new feature/plugin/integration: |
| 32 | + - Make sure the feature is covered by tests |
| 33 | + - Provide a meaningful description. In most cases it would make sens to first open a issue with a suggestion, discuss about it and have it approved before working on it |
| 34 | + |
| 35 | +- When fixing bug: |
| 36 | + - Try to cover the scenario with tests if possible |
| 37 | + - If an issue for this bug already exists, please reference it via (`Refs: #XYZ` - where `XYZ` is an issue number) at the very bottom of your commit message and PR description as proposed by [conventional commits v1.0.0 style guide](https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-multi-paragraph-body-and-multiple-footers) |
| 38 | + - If there is no issue connected with the bug, please provide a detailed description of the problem in the PR. Live demo preferred ([look for the codeine example project in the bug issue template](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/blob/master/.github/ISSUE_TEMPLATE/bug_report.md)) |
| 39 | + |
| 40 | +## Development Setup |
| 41 | + |
| 42 | +<!-- textlint-disable spelling --> |
| 43 | +You will need [Node.js](https://nodejs.org/en/) **version 16+** and [yarn](https://yarnpkg.com/getting-started/install). |
| 44 | +<!-- textlint-enable --> |
| 45 | + |
| 46 | +After cloning the repository, run: |
| 47 | + |
| 48 | +``` bash |
| 49 | +yarn i # installs the project dependencies |
| 50 | +cd example && yarn i # install dependencies for example project (useful for testing) |
| 51 | +``` |
| 52 | + |
| 53 | +### Committing Changes |
| 54 | + |
| 55 | +Commit messages should follow the [conventional commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) so that changelogs can be automatically generated. Commit messages will be automatically validated upon commit. |
| 56 | + |
| 57 | +### These npm scripts are available in the repo |
| 58 | + |
| 59 | +When fired in the project root they will run corresponding actions in every nested package at once. |
| 60 | + |
| 61 | +``` bash |
| 62 | +# build the project for NPM and example usage |
| 63 | +$ yarn build |
| 64 | + |
| 65 | +# run tests once |
| 66 | +$ yarn test |
| 67 | + |
| 68 | +# open cypress component runner from example directory |
| 69 | +# requires plugin to be built first via `yarn build` |
| 70 | +$ yarn test:ct |
| 71 | + |
| 72 | +# open cypress e2e runner from example directory |
| 73 | +# requires plugin to be built first via `yarn build` |
| 74 | +$ yarn test:e2e |
| 75 | + |
| 76 | +# run tests and collect coverage |
| 77 | +$ yarn test:integration:coverage |
| 78 | + |
| 79 | +# lint & try to autofix linting errors |
| 80 | +$ yarn fix:lint && yarn prettify |
| 81 | + |
| 82 | +# lint files |
| 83 | +$ yarn lint && yarn prettify:ci |
| 84 | +``` |
| 85 | + |
| 86 | +There are some other scripts available in the `scripts` section of the `package.json` file. |
| 87 | + |
| 88 | +## Credits |
| 89 | + |
| 90 | +Many thanks to all the people who have already contributed to @frsource/cypress-plugin-visual-regression-diff! ❤️ |
0 commit comments