You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+74-30Lines changed: 74 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -7,76 +7,120 @@ First of all, thank you so much for being interested in contributing to filestac
7
7
- Creating new examples
8
8
9
9
## Issues
10
+
10
11
Feel free to open new issues or participating in the discussion of the existing ones on
11
12
[this repository](https://github.com/filestack/filestack-react/issues), but before doing so, please make sure that the issue is not duplicated and/or the discussion is related to the topic of the issue.
12
13
13
14
## Pull requests
15
+
14
16
Code contributions are welcome following a process which guarantees the long-term maintainability of the project.
15
17
You can contribute either with bugfixes or new features. Before submitting a new feature, we highly encourage you to first open a new issue describing its motivation and details and discuss it with one of the project mantainers. This will ensure that the feature fits well in the project.
16
18
17
19
### Step 1: Open a new issue (if not opened yet)
20
+
18
21
Before starting to code, it is desirable to first open an issue describing the bug or the new feature. Please be sure the issue is not duplicated.
19
22
20
23
### Step 2: Fork the repository
24
+
21
25
Fork the project https://github.com/filestack/filestack-react into your account. Then, check out your copy of the project locally.
26
+
27
+
### Step 3: Create a new feature branch `contrib/issue-[number]`
28
+
29
+
Put your code in a new feature branch. The name of the new branch should start with `contrib/issue-`. This convention will help us to keep track of future changes from pull requests.
### Step 3: Create a new feature branch `contrib/issue-number`
29
-
Put your code in a new feature branch. The name of the new branch should start with `contrib/`. This convention will help us to keep track of future changes from pull requests.
35
+
Note that `tags/[tag-name]` would correspond with one of the existing tags in the project. List all the tags with `git tag`, or look on the project home page. For example, suppose that the latest version of the project is `v1.2.3` (note the 'v' is part of the tag name), and you want to fix a new bug that you discovered in this version. If the new reported issue has an id of #186, then you would create your feature branch in this way:
Note that tags/tag-number would correspond with any of the tags (for example 1.0.X). For example, suppose that the latest version of the project is v1.0.0 and you want to fix a new bug that you discovered in this version. If the new reported issue has an id, say, #186, then you would create your feature branch in this way:
40
+
41
+
### Step 4: Create your feature or bugfix
42
+
43
+
The whole component is located inside src/ReactFilestack.jsx.
44
+
45
+
#### Install dependencies
46
+
34
47
```
35
-
git checkout -b contrib/issue-186 tags/1.0.X
48
+
npm install
36
49
```
37
50
38
-
###Step 4: Committing your changes
39
-
First of all, make sure that git is configured with your complete name and email address. It is desirable to use the same email of your Github account, this will help to identify the contributions:
Write a good commit message. It should describe the changes you made and its motivation. Be sure to reference the issue you are working in the commit that finishes your contribution using one the [keywords to close issues in Github](https://help.github.com/articles/closing-issues-via-commit-messages/).
45
-
If your commit message is too long, try to summarize the changes in the header of the message, like this:
56
+
57
+
#### Run unit tests
58
+
59
+
Verify that your changes are actually working by adding the required unit tests. It is desirable to include unit tests covering all new features you implement. Also, if you find a bug which is not currently detected by the unit tests you might consider to implement a new one or modify the current implementation. After this, you can verify that everything works fine after your changes with:
60
+
46
61
```
47
-
fix #xx : summarize your commit in one line
62
+
npm test
63
+
```
64
+
65
+
#### Lint the code
48
66
49
-
If needed, explain more in detail the changes introduced in your
50
-
commit and the motivation. You could introduce some background
51
-
about the issue you worked in.
67
+
Ensure that your code meets the project's style, enforced by eslint.
52
68
53
-
This message can contain several paragraphs and be as long as
54
-
you need, but try to do a good indentation: the columns should
55
-
be shorter than 72 characters and with a proper word-wrap.
56
-
The command `git log` will print this complete text in a nice
57
-
way if you format it properly.
58
69
```
59
-
The header and the body of the commit message must be separated by a line in blank. The header is the message shown when running the command `git shortlog`.
70
+
npm run lint
71
+
```
72
+
73
+
#### Link to an existing project (optional)
74
+
75
+
You may want to test how the filestack-react works with an existing project, or a new demo project. Use [NPM link](https://docs.npmjs.com/cli/link) to tell your existing project to use your local development version of filestack-react instead of the one from NPM.
60
76
61
-
#### Test your code
62
-
Verify that your changes are actually working by adding the required unit tests. It is desirable to include unit test covering all new features you implement. Also, if you find a bug which is not currently detected by the unit tests you might consider to implement a new one or modify the current implementation. After this, you can verify that everything works fine after your changes with:
77
+
In the filestack-react development folder:
63
78
64
79
```
65
-
nosetests
80
+
npm link
66
81
```
67
82
68
-
### Step 5: Push your changes
83
+
If your existing/demo project is already using filestack-react from NPM, uninstall it.
84
+
85
+
```
86
+
npm uninstall filestack-react
87
+
```
88
+
89
+
Then link to the local version of filestack-react. In your existing/demo folder:
90
+
91
+
```
92
+
npm link ../somepath/to/filestack-react
93
+
```
94
+
95
+
### Step 5: Committing your changes
96
+
97
+
#### Git congif
98
+
99
+
Make sure your git client is configured with your complete name and email address. It is desirable to use the same email of your Github account, this will help to identify the contributions:
We follow the [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/) to ensure consistent commit messages and changelog formatting. Be sure to reference the issue you are working on in the commit that finishes your contribution using one the [keywords to close issues in Github](https://help.github.com/articles/closing-issues-via-commit-messages/).
109
+
110
+
### Step 6: Push your changes
69
111
70
112
Push your changes to your forked project with:
113
+
71
114
```
72
115
git push origin contrib/issue-186
73
116
```
74
117
75
-
### Step 6: Create and submit a pull request
76
-
Go to your forked project on GitHub, select your feature branch and click the “Compare, review, create a pull request button”.
118
+
### Step 7: Create and submit a pull request
77
119
120
+
Go to your forked project on GitHub, select your feature branch and click the “Compare, review, create a pull request button”.
78
121
79
122
### License Agreement
123
+
80
124
By contributing your code, you agree to license your contribution under the terms of the [Apache 2.0 license](https://raw.githubusercontent.com/citiususc/hipster/4ca93e681ad7335acbd0bea9e49fe678d56f3519/LICENSE).
81
125
82
126
Also, remember to add this header to each new file that you’ve created:
0 commit comments