Skip to content

Commit cbc579d

Browse files
docs: move test, lint, release from README.md to CONTRIBUTING.md
1 parent 1432d1f commit cbc579d

File tree

2 files changed

+50
-48
lines changed

2 files changed

+50
-48
lines changed

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,53 @@ Things that will improve the chance that your pull request will be accepted:
4444

4545
[ci]: https://travis-ci.org/remarkablemark/html-react-parser
4646
[commit]: https://www.conventionalcommits.org/
47+
48+
## Test
49+
50+
Run tests:
51+
52+
```sh
53+
$ npm test
54+
```
55+
56+
Run tests with coverage:
57+
58+
```sh
59+
$ npm run test:coverage
60+
```
61+
62+
View coverage report in your browser:
63+
64+
```sh
65+
$ npm run test:coverage:report
66+
$ open coverage/index.html
67+
```
68+
69+
## Lint
70+
71+
Lint codebase:
72+
73+
```sh
74+
$ npm run lint
75+
```
76+
77+
Fix lint errors:
78+
79+
```sh
80+
$ npm run lint:fix
81+
```
82+
83+
Test TypeScript declaration file for style and correctness:
84+
85+
```sh
86+
$ npm run lint:dts
87+
```
88+
89+
## Release
90+
91+
Only collaborators with credentials can release and publish:
92+
93+
```sh
94+
$ npm run release
95+
$ npm publish && git push --follow-tags
96+
```

README.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -242,45 +242,6 @@ Although `<script>` tags and their contents are rendered on the server-side, the
242242

243243
This is because [inline event handlers](https://developer.mozilla.org/docs/Web/Guide/Events/Event_handlers) (e.g., `onclick`) are parsed as a _string_ instead of a _function_. See [#73](https://github.com/remarkablemark/html-react-parser/issues/73).
244244

245-
## Testing
246-
247-
Run tests:
248-
249-
```sh
250-
$ npm test
251-
```
252-
253-
Run tests with coverage:
254-
255-
```sh
256-
$ npm run test:coverage
257-
```
258-
259-
View coverage in browser:
260-
261-
```sh
262-
$ npm run test:coverage:report
263-
$ open coverage/index.html
264-
```
265-
266-
Lint files:
267-
268-
```sh
269-
$ npm run lint
270-
```
271-
272-
Fix lint errors:
273-
274-
```sh
275-
$ npm run lint:fix
276-
```
277-
278-
Test TypeScript declaration file for style and correctness:
279-
280-
```sh
281-
$ npm run lint:dts
282-
```
283-
284245
## Benchmarks
285246

286247
```sh
@@ -295,15 +256,6 @@ html-to-react - Multiple x 139,780 ops/sec ±2.32% (87 runs sampled)
295256
html-to-react - Complex x 8,118 ops/sec ±2.99% (82 runs sampled)
296257
```
297258

298-
## Release
299-
300-
Only collaborators with credentials can release and publish:
301-
302-
```sh
303-
$ npm run release
304-
$ git push --follow-tags && npm publish
305-
```
306-
307259
## Contributors
308260

309261
### Code Contributors

0 commit comments

Comments
 (0)