Skip to content

Commit

Permalink
documentation, new version, better help
Browse files Browse the repository at this point in the history
  • Loading branch information
inthemill committed May 15, 2018
1 parent eb2d9a4 commit 8102c80
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
[![Build Status](https://travis-ci.org/inthemill/istanbul-tolerant-merge.svg?branch=master)](https://travis-ci.org/inthemill/istanbul-tolerant-merge)

# istanbul-tolerant-merge
Merges several istanbul coverage report JSON files into one. Thereby normalizes absolute path to relative ones, fixes a problem with karma-coverage-istanbul-reporter and aligns list of statements, that do not match 1:1 with some heuristics
Merges several istanbul coverage report JSON files into one. Additional to the built in merging capability of `istanbul report` istanbul-tolerant-merge has the following features:

- it normalizes absolute path to relative ones. This helps when you want to create html-output
- fixes a problem with karma-coverage-istanbul-reporter where statment ids start with 0 instead of 1
- Aligns list of statements, if they do not match exactly

## Installation

With [npm](https://www.npmjs.com/) do

npm install istanbul-tolerant-merge --save-dev

## Usage

```bash
npx --out coverage/coverage.json "coverage/partial/*.json"
```

## Help

```
Usage: istanbul-tolerant-merge.js --out path/to/output.json "a/**.json"
b/input.json
Options:
--out output path for merged raw coverage report JSON file
[string] [required]
--base if pathes in coverage report JSON files are absolute, they will be
rewritten relative based to this value
[string] [default: "/home/emanuel/dev/opensource/istanbul-tolerant-merge"]
--help Show help [boolean]
--version Show version number [boolean]
at least one path to raw coverage report JSON files is required
```
2 changes: 1 addition & 1 deletion bin/istanbul-tolerant-merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const options = require('yargs')
.string('_')
.describe('_', 'paths to raw coverage report JSON files to merge')
.help()
.usage('Usage: $0 --out path/to/output.json "a/**.json" b/input.json')
.usage('Usage: istanbul-tolerant-merge --out path/to/output.json "a/**.json" b/input.json')
.version()
.argv;

Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "istanbul-tolerant-merge",
"version": "1.0.0",
"version": "1.0.1",
"description": "Merges several istanbul coverage report JSON files into one. Thereby normalizes absolute path to relative ones, fixes a problem with karma-coverage-istanbul-reporter and aligns list of statements, that do not match 1:1 with some heuristics",
"main": "index.js",
"scripts": {
Expand All @@ -14,6 +14,10 @@
"engines": {
"node": ">=8.0"
},
"repository": {
"type": "git",
"url": "https://github.com/inthemill/istanbul-tolerant-merge"
},
"dependencies": {
"a-star": "^0.2.0",
"glob": "^7.1.2",
Expand Down

0 comments on commit 8102c80

Please sign in to comment.