# istanbul-combine

> easily merge coverage data from multiple istanbul runs

Latest version **0.3.0** (published 2015-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install istanbul-combine
pnpm add istanbul-combine
yarn add istanbul-combine
bun add istanbul-combine
```

Provides the command `istanbul-combine`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2015-06-24 |
| First published | 2015-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Talmage |
| Maintainers | james.talmage |
| Keywords | istanbul, test, coverage, report |

## Links

- npm: https://www.npmjs.com/package/istanbul-combine
- Repository: https://github.com/jamestalmage/istanbul-combine
- Issues: https://github.com/jamestalmage/istanbul-combine/issues
- npm.io page: https://npm.io/package/istanbul-combine

## Dependencies (4)

- [q](https://npm.io/package/q.md) ^1.2.0
- [glob](https://npm.io/package/glob.md) ^5.0.3
- [istanbul](https://npm.io/package/istanbul.md) 0.3.x
- [minimist](https://npm.io/package/minimist.md) ^1.1.1

## Recent versions

- 0.3.0 (latest) — 2015-06-24
- 0.2.1 — 2015-06-24
- 0.2.0 — 2015-06-24
- 0.1.1 — 2015-06-24
- 0.1.0 — 2015-06-24
- 0.0.2 — 2015-06-24
- 0.0.1 — 2015-04-09

## README

istanbul-combine
================
Combine coverage reports from multiple runs in to a single coverage report.

[![Build Status](https://travis-ci.org/jamestalmage/istanbul-combine.svg?branch=master)](https://travis-ci.org/jamestalmage/istanbul-combine)

[![peerDependency Status](https://david-dm.org/jamestalmage/istanbul-combine/peer-status.svg)](https://david-dm.org/jamestalmage/istanbul-combine#info=peerDependencies)
[![Dependency Status](https://david-dm.org/jamestalmage/istanbul-combine.svg)](https://david-dm.org/jamestalmage/istanbul-combine)
[![devDependency Status](https://david-dm.org/jamestalmage/istanbul-combine/dev-status.svg)](https://david-dm.org/jamestalmage/istanbul-combine#info=devDependencies)

```javascript
var combine = require('istanbul-combine');

var opts = {
  dir: 'coverage',                       // output directory for combined report(s)
  pattern: 'coverage/*-coverage.json',   // json reports to be combined 
  print: 'summary',                      // print to the console (summary, detail, both, none) 
  base:'sources',                        // base directory for resolving absolute paths, see karma bug
  reporters: {
    html: { /* html reporter options */ },
    cobertura: { /* etc. */ }
  }
};

combine(opts, function(err) { });         // async with node style completion callback
combine(opts).then(/* ... */ );           // async with promise return value
combine.sync(opts);                       // synchronous
```

### command line

```
npm install -g istanbul-combine

istanbul-combine -d coverage -p summary -r lcov -r html coverage/coverage-a.json coverage/coverage-b.json /coverage/*.json
```

usage: `istanbul-combine [options] patterns`

where `patterns` is any number of file glob-patterns separated by whitespace

options:

 * `-d` : output directory for the report(s). Defaults to `coverage`
 * `-p` : what to print to the console. `summary` | `detail` | `both` | `none`. Defaults to `summary`.
 * `-r` : a reporter. `lcov`, `html`, etc. You can specify multiple reporters by using this tag multiple times.
 * `-b` : base directory resolving relative paths to absolute ones. Fixes a bug with where karma reports relative file paths.

#### karma bug

You will need to use the `base` or `-b` option if you intend to combine reports generated using `karma-coverage` with
reports generated using other tools (i.e. tests not run in the browser).
See [this pull request](https://github.com/karma-runner/karma-coverage/pull/163).

---
_Source: https://npm.io/package/istanbul-combine · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
