Skip to content

Commit 68d6333

Browse files
authored
docs: move setup docs out of the readme [skip ci] (#1052)
1 parent 8da097e commit 68d6333

File tree

3 files changed

+70
-69
lines changed

3 files changed

+70
-69
lines changed

README.md

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -421,76 +421,9 @@ rather than having to ignore every instance of that method:
421421
}
422422
```
423423

424-
## Integrating with coveralls
424+
## [Integrating with coveralls](./docs/setup-coveralls.md)
425425

426-
[coveralls.io](https://coveralls.io) is a great tool for adding
427-
coverage reports to your GitHub project. Here's how to get nyc
428-
integrated with coveralls and travis-ci.org:
429-
430-
1. add the coveralls and nyc dependencies to your module:
431-
432-
```shell
433-
npm install coveralls nyc --save-dev
434-
```
435-
436-
2. update the scripts in your package.json to include these bins:
437-
438-
```json
439-
{
440-
"scripts": {
441-
"test": "nyc mocha",
442-
"coverage": "nyc report --reporter=text-lcov | coveralls"
443-
}
444-
}
445-
```
446-
447-
3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis.
448-
449-
4. add the following to your `.travis.yml`:
450-
451-
```yaml
452-
after_success: npm run coverage
453-
```
454-
455-
That's all there is to it!
456-
457-
> Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck `LEAVE COMMENTS?`.
458-
459-
## Integrating with codecov
460-
461-
`nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov`
462-
463-
[codecov](https://codecov.io/) is a great tool for adding
464-
coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:
465-
466-
Here's how to get `nyc` integrated with codecov and travis-ci.org:
467-
468-
1. add the codecov and nyc dependencies to your module:
469-
470-
```shell
471-
npm install codecov nyc --save-dev
472-
```
473-
474-
2. update the scripts in your package.json to include these bins:
475-
476-
```json
477-
{
478-
"scripts": {
479-
"test": "nyc tap ./test/*.js",
480-
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
481-
}
482-
}
483-
```
484-
485-
3. For private repos, add the environment variable `CODECOV_TOKEN` to travis.
486-
487-
4. add the following to your `.travis.yml`:
488-
489-
```yaml
490-
after_success: npm run coverage
491-
```
492-
493-
That's all there is to it!
426+
## [Integrating with codecov](./docs/setup-codecov.md)
494427

495428
## Integrating with TAP formatters
496429

docs/setup-codecov.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Integrating with codecov.io
2+
3+
> **tl;dr**:
4+
> `nyc --reporter=lcov npm test && npx codecov`
5+
6+
[codecov](https://codecov.io/) is a great tool for adding
7+
coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:
8+
9+
Here's how to get `nyc` integrated with codecov and travis-ci.org, assuming you have the `npx` executable (included with npm v5.2 and above):
10+
11+
1. add the codecov and nyc dependencies to your module:
12+
13+
```shell
14+
npm install nyc --save-dev
15+
```
16+
17+
2. update the scripts in your package.json to include these lines:
18+
19+
```json
20+
{
21+
"scripts": {
22+
"test": "nyc --reporter=lcov mocha ./test/*.js",
23+
"coverage": "npx codecov"
24+
}
25+
}
26+
```
27+
28+
3. For private repos, add the environment variable `CODECOV_TOKEN` to travis.
29+
30+
4. add the following to your `.travis.yml`:
31+
32+
```yaml
33+
after_success: npm run coverage
34+
```

docs/setup-coveralls.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Integrating with coveralls.io
2+
3+
[coveralls.io](https://coveralls.io) is a great tool for adding
4+
coverage reports to your GitHub project. Here's how to get nyc
5+
integrated with coveralls and travis-ci.org:
6+
7+
1. add the coveralls and nyc dependencies to your module:
8+
9+
```shell
10+
npm install coveralls nyc --save-dev
11+
```
12+
13+
2. update the scripts in your package.json to include these bins:
14+
15+
```json
16+
{
17+
"scripts": {
18+
"test": "nyc mocha",
19+
"coverage": "nyc report --reporter=text-lcov | coveralls"
20+
}
21+
}
22+
```
23+
24+
3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis.
25+
26+
4. add the following to your `.travis.yml`:
27+
28+
```yaml
29+
after_success: npm run coverage
30+
```
31+
32+
That's all there is to it!
33+
34+
> Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck `LEAVE COMMENTS?`.

0 commit comments

Comments
 (0)