-
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: zero-dependencies, add --output-path alias
Alias `--outputPath` to `--output-path`
- Loading branch information
Showing
4 changed files
with
16 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,35 +27,36 @@ Currently just reads from Istanbul's JSON summary reporter and downloads a badge | |
|
||
1. Configure Jest (in `package.json`): | ||
|
||
```json | ||
"jest": { | ||
"coverageReporters": [ | ||
"json-summary" | ||
] | ||
} | ||
``` | ||
```json | ||
"jest": { | ||
"coverageReporters": [ | ||
"json-summary" | ||
] | ||
} | ||
``` | ||
|
||
2. Run `npm test -- --coverage` | ||
3. Run `make-coverage-badge` | ||
|
||
Resulting badge will be in `./coverage/badge.svg`. | ||
|
||
## Options | ||
#### `make-coverage-badge --outputPath <path...>` | ||
|
||
Creates the svg at the specified path (relative to project root). Defaults to `./coverage/badge.svg`. | ||
### `--output-path <path>` | ||
|
||
Writes the coverage badge to the given path (relative to project root). Defaults to `./coverage/badge.svg`. | ||
|
||
## Prior work | ||
|
||
* [Coveralls][]: paid for private repos | ||
* [coverage-badger][]: same approach, but using an XML report and therefore requires XML dependencies | ||
- [Coveralls][]: paid for private repos | ||
- [coverage-badger][]: same approach, but using an XML report and therefore requires XML dependencies | ||
|
||
[Coveralls]: https://coveralls.io/ | ||
[coveralls]: https://coveralls.io/ | ||
[coverage-badger]: https://github.com/notnotse/coverage-badger | ||
|
||
## Author | ||
|
||
© 2017 Tom Vincent <[email protected]> (https://tlvince.com) | ||
© 2019 Tom Vincent <[email protected]> (https://tlvince.com) | ||
|
||
## License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters