1
1
# Contributing
2
2
3
+ <details >
4
+ <summary >Table of Contents</summary >
5
+
6
+ - [ Test] ( #test )
7
+ - [ Lint] ( #lint )
8
+ - [ Release] ( #release )
9
+
10
+ </details >
11
+
3
12
All pull requests are welcome! By participating in this project, you
4
13
agree to abide by our ** [ code of conduct] ** .
5
14
@@ -11,22 +20,21 @@ agree to abide by our **[code of conduct]**.
11
20
12
21
``` sh
13
22
# replace `<user>` with your username
14
- $ git clone git@github.com:< user> /html-react-parser.git
15
- $ cd html-react-parser
23
+ git clone git@github.com:< user> /html-react-parser.git && cd html-react-parser
16
24
```
17
25
18
26
Install package dependencies:
19
27
20
28
``` sh
21
- $ npm install
29
+ npm install
22
30
```
23
31
24
32
Make your change. Add tests and/or documentation. Ensure all tests and lint pass:
25
33
26
34
``` sh
27
- $ npm test
28
- $ npm run lint
29
- $ npm run lint:dts
35
+ npm test
36
+ npm run lint
37
+ npm run lint:dts
30
38
```
31
39
32
40
Write a commit message that follows the [ Conventional Commits] [ commit ] specification.
@@ -35,7 +43,7 @@ The commit message will be linted during the pre-commit Git hook.
35
43
To manually lint the most recent commit message:
36
44
37
45
``` sh
38
- $ git log -1 --pretty=format:" %s" | npx commitlint
46
+ git log -1 --pretty=format:" %s" | npx commitlint
39
47
```
40
48
41
49
Push to your fork and [ submit a pull request] [ pr ] .
@@ -60,40 +68,35 @@ Things that will improve the chance that your pull request will be accepted:
60
68
Run tests with coverage:
61
69
62
70
``` sh
63
- $ npm test
71
+ npm test
64
72
```
65
73
66
74
View coverage report in your browser:
67
75
68
76
``` sh
69
- $ open coverage/index.html
77
+ open coverage/lcov-report /index.html
70
78
```
71
79
72
80
## Lint
73
81
74
82
Lint codebase:
75
83
76
84
``` sh
77
- $ npm run lint
85
+ npm run lint
78
86
```
79
87
80
88
Fix lint errors:
81
89
82
90
``` sh
83
- $ npm run lint:fix
91
+ npm run lint:fix
84
92
```
85
93
86
94
Test TypeScript declaration files for style and correctness:
87
95
88
96
``` sh
89
- $ npm run lint:dts
97
+ npm run lint:dts
90
98
```
91
99
92
100
## Release
93
101
94
- Only collaborators with credentials can release and publish:
95
-
96
- ``` sh
97
- $ npm run release
98
- $ git push --follow-tags && npm publish
99
- ```
102
+ Release is automated by [ Release Please] ( https://github.com/googleapis/release-please ) .
0 commit comments