Skip to content

Commit

Permalink
docs(codecov): use npx
Browse files Browse the repository at this point in the history
  • Loading branch information
JaKXz committed Apr 18, 2019
1 parent 85c1eac commit 8b16fe6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/setup-codecov.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Integrating with codecov.io

> **tl;dr**:
> `nyc --reporter=lcov npm test && npx codecov`
**tl;dr**:
### `npx nyc --reporter=lcov npm test && npx codecov`

[codecov](https://codecov.io/) is a great tool for adding
coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:

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):
Here's how to get `nyc` integrated with codecov and travis-ci.org, assuming you don't have the `npx` executable:

1. add the codecov and nyc dependencies to your module:

```shell
npm install nyc --save-dev
npm install codecov nyc --save-dev
```

2. update the scripts in your package.json to include these lines:

```json
{
"scripts": {
"test": "nyc --reporter=lcov mocha ./test/*.js",
"coverage": "npx codecov"
"test": "nyc --reporter=lcov mocha",
"coverage": "codecov"
}
}
```
Expand Down

0 comments on commit 8b16fe6

Please sign in to comment.