|
1 |
| ---- |
2 |
| -id: contributing |
3 |
| -title: Contributing |
4 |
| ---- |
5 |
| - |
6 |
| -Use [Github issues](https://github.com/adazzle/react-data-grid/issues) for feature requests and bug reports. |
7 |
| - |
8 |
| -## <a name="question"></a> Got a Question or Problem? |
9 |
| - |
10 |
| -If you have questions about how to *use* react-data-grid, please direct them to [StackOverflow](http://stackoverflow.com/questions/tagged/react-data-grid). We are also available on our [Slack channel](https://react-data-grid.herokuapp.com/) |
11 |
| - |
12 |
| -## <a name="issue"></a> Found an Issue? |
13 |
| -If you find a bug in the source code or a mistake in the documentation, you can help us by |
14 |
| -[submitting an issue](#submit-issue) to our [GitHub Repository](https://github.com/adazzle/react-data-grid). Even better, you can |
15 |
| -[submit a Pull Request](#submit-pr) with a fix. |
16 |
| - |
17 |
| -## <a name="feature"></a> Want a Feature? |
18 |
| -You can *request* a new feature by submitting an issue to our [GitHub |
19 |
| -Repository](https://github.com/adazzle/react-data-grid). If you would like to *implement* a new feature, please submit an issue with |
20 |
| -a proposal for your work first, to be sure that we can use it. |
21 |
| -Please consider what kind of change it is: |
22 |
| - |
23 |
| -* For a **Major Feature**, first open an issue and outline your proposal so that it can be |
24 |
| -discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, |
25 |
| -and help you to craft the change so that it is successfully accepted into the project. |
26 |
| -* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). |
27 |
| - |
28 |
| - |
29 |
| -## Development |
30 |
| -We want anyone contributing to react-data-grid to have the best experience possible. |
31 |
| - |
32 |
| -### tl;dr |
33 |
| -You can start coding in 5 minutes. |
34 |
| - |
35 |
| -```sh |
36 |
| -git clone https://github.com/adazzle/react-data-grid.git |
37 |
| -cd react-data-grid |
38 |
| -npm install |
39 |
| -npm run build |
40 |
| -npm start |
41 |
| -``` |
42 |
| - |
43 |
| -command | outcome | |
44 |
| ------------------------|-------------------------------------------------------------------------------------------------------| |
45 |
| -npm test | runs tests in release mode | |
46 |
| -npm run dev-test | runs tests in debug mode | |
47 |
| -npm start | starts webpack dev server | |
48 |
| -npm run eslint | runs the eslint task (runs automatically before npm test) | |
49 |
| -npm run build | build the project in release mode | |
50 |
| -npm run web | builds and runs a local copy of the public RDG Site | |
51 |
| - |
52 |
| - |
53 |
| -### Environment |
54 |
| -We use webpack-dev-server for development. If you're fancy about knowing the tools you’re working with you can find the details about this awesome tool [in here](https://webpack.github.io/docs/webpack-dev-server.html). |
55 |
| -To run webpack-dev-server all you need to do is to run the following command: |
56 |
| -```sh |
57 |
| -npm start |
58 |
| -``` |
59 |
| -This will open your default browser at `http://localhost:8080/webpack-dev-server/` an you can navigate in our examples from there. |
60 |
| -HMR is enabled, that means you won't need to reload the page wherever you make a change, webpack-dev-server will watch for any changes in the source code. |
61 |
| - |
62 |
| -### Testing |
63 |
| -To run tests in release and dev mode you just need to run: |
64 |
| -`npm test` for release |
65 |
| -`npm dev-test` for debug |
66 |
| - |
67 |
| -We want to keep our test coverage high, so when contributing you will need to test the changes you’re making and all the tests need to run successfully. |
68 |
| - |
69 |
| -Any file inside a `__tests__` subfolder in the packages folder that looks like `*.spec.js` will be picked up an executed by the test runner. |
70 |
| -When writing new tests you must follow the following guidelines: |
71 |
| -- If it is a test for a functionality that is already tested you need to write your tests in the existing spec file for that component. |
72 |
| -- If you’re adding a new functionality, or testing a untested one you will need to add a spec file (and maybe a `__tests__` folder if that directory level doesn’t have one), |
73 |
| - that spec file must be in the same deep level as the file your testing and by standard it will need to have the same name. |
74 |
| - |
75 |
| -### Code style |
76 |
| -We use [eslint](http://eslint.org/) to enforce some code standards. |
77 |
| -An npm script will run automatically before testing to check if there are any violations to the set of rules we defined, you can also run that same script independently by running `npm run eslint` on your console. |
78 |
| -The easiest way to be aware of any violation on coding time is to have a plugin in you text editor that will be checking for any violation on the run. |
79 |
| -Most modern text editor have their own plugins, you can find them in here for this popular editors: |
80 |
| - |
81 |
| -- [VS Code eslint plugin](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) |
82 |
| -- [Atom eslint plugin](https://atom.io/packages/linter-eslint) |
83 |
| -- [Sublime Text](https://github.com/roadhump/SublimeLinter-eslint) |
84 |
| - |
85 |
| -### Text Editor |
86 |
| -Internally we use [VS Code](https://code.visualstudio.com/) as our main text editor, it is quite extensible and fully configurable. |
87 |
| -It doesn’t mean you need to use it to contribute to our community. |
88 |
| -You can use whatever is your personal preference, although it would be nice if it supports a eslint plugin as it would make your life a lot easier. |
89 |
| - |
90 |
| -### Build |
91 |
| -To build the project you will need to run `npm run build`. |
92 |
| -It will create a dist folder for each package, that dist folder will be what is published to npm after your code being released. |
93 |
| - |
94 |
| -### Review process |
95 |
| -To be accepted your code needs to be mergeable with the master branch, and the CI builds needs to be passing. After a sign of from those requirements you code will be subject of a code review by one of the team members. |
96 |
| -All contributions are encouraged and most of all we hope you will have some fun writing code for react-data-grid. |
97 |
| - |
98 | 1 | ### Release process
|
99 | 2 |
|
100 | 3 | For maintainers only.
|
|
0 commit comments