|
| 1 | +# Contributing to react-vtk-js |
| 2 | +--- |
| 3 | + |
| 4 | +We welcome you to join the development of react-vtk-js. This document will help you through the process. |
| 5 | + |
| 6 | +## Before You Start |
| 7 | + |
| 8 | +Please follow the coding style: |
| 9 | + |
| 10 | +- Follow [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript). |
| 11 | +- Use soft-tabs with a two space indent. |
| 12 | +- Don't put commas first. |
| 13 | + |
| 14 | +## Workflow |
| 15 | + |
| 16 | +1. The react-vtk-js source is maintained [on GitHub](https://github.com/kitware/react-vtk-js). |
| 17 | +2. [Fork react-vtk-js](https://help.github.com/articles/fork-a-repo/) into your user's namespace on GitHub. |
| 18 | +3. Clone the repository to your computer. |
| 19 | + |
| 20 | + ```sh |
| 21 | + $ git clone https://github.com/<username>/react-vtk-js.git |
| 22 | + $ cd react-vtk-js |
| 23 | + ``` |
| 24 | + |
| 25 | +4. Configure the upstream remote and update the local master branch |
| 26 | + |
| 27 | + ```sh |
| 28 | + $ git remote add https://github.com/kitware/react-vtk-js.git |
| 29 | + $ git fetch upstream --prune --tags |
| 30 | + $ git checkout master |
| 31 | + $ git pull upstream master |
| 32 | + ``` |
| 33 | + |
| 34 | +4. Run the install script for react-vtk-js dependencies: |
| 35 | + ```sh |
| 36 | + $ npm install |
| 37 | + ``` |
| 38 | + |
| 39 | +5. Create a feature branch. |
| 40 | + |
| 41 | + ``` |
| 42 | + $ git checkout -b new_feature |
| 43 | + ``` |
| 44 | + |
| 45 | +4. Start hacking. |
| 46 | + |
| 47 | + ```sh |
| 48 | + $ edit file1 file2 file3 |
| 49 | + $ git add file1 file2 file3 |
| 50 | + ``` |
| 51 | + |
| 52 | +5. Use Commitizen to create commits |
| 53 | + |
| 54 | + ```sh |
| 55 | + $ npm run commit |
| 56 | + ``` |
| 57 | + |
| 58 | +6. Push commits in your feature branch to your fork in GitHub: |
| 59 | + |
| 60 | + ```sh |
| 61 | + $ git push origin new_feature |
| 62 | + ``` |
| 63 | + |
| 64 | +7. Visit your fork in Github, browse to the "**Pull Requests**" link on the left, and use the |
| 65 | + "**New Pull Request**" button in the upper right to create a Pull Request. |
| 66 | + |
| 67 | + For more information see: |
| 68 | + [Create a Pull Request](https://help.github.com/articles/creating-a-pull-request/) |
| 69 | + |
| 70 | +8. react-vtk-js uses GitHub for code review and Github Actions to validate proposed patches before they are merged. |
| 71 | + |
| 72 | +## Notice |
| 73 | + |
| 74 | +- Don't modify the version number in `package.json`. It will be automatically updated after the PR |
| 75 | + is merged. |
| 76 | +
|
| 77 | +## Reporting Issues |
| 78 | +
|
| 79 | +If you encounter problems using react-vtk-js you may be able to find the solutions in the |
| 80 | +[vtk-js troubleshooting docs](https://kitware.github.io/vtk-js/docs/misc_troubleshooting.html), in an |
| 81 | +existing [GitHub issue](https://github.com/kitware/react-vtk-js/issues), or via the |
| 82 | +[VTK discourse page](https://discourse.vtk.org/). |
| 83 | +If you can't find the answer, please |
| 84 | +[report a new issue on GitHub](https://github.com/Kitware/react-vtk-js/issues/new). |
0 commit comments