# lcov-sourcemap

> Transform an LCOV file using sourcemaps.

Latest version **0.3.0** (published 2016-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install lcov-sourcemap
pnpm add lcov-sourcemap
yarn add lcov-sourcemap
bun add lcov-sourcemap
```

## 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 | 2016-03-25 |
| First published | 2015-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jesse Zhang |
| Maintainers | jessezhang91 |
| Keywords | lcov, sourcemap, transform |

## Links

- npm: https://www.npmjs.com/package/lcov-sourcemap
- Repository: https://github.com/Tapad/lcov-sourcemap
- Issues: https://github.com/Tapad/lcov-sourcemap/issues
- npm.io page: https://npm.io/package/lcov-sourcemap

## Dependencies (5)

- [lodash](https://npm.io/package/lodash.md) ^3.6.0
- [bluebird](https://npm.io/package/bluebird.md) ^2.9.21
- [lcov-parse](https://npm.io/package/lcov-parse.md) 0.0.9
- [source-map](https://npm.io/package/source-map.md) ^0.4.2
- [convert-source-map](https://npm.io/package/convert-source-map.md) ^1.2.0

## Recent versions

- 0.3.0 (latest) — 2016-03-25
- 0.2.0 — 2016-03-15
- 0.1.3 — 2015-05-08
- 0.1.2 — 2015-03-31

## README

# [lcov](http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php)-[sourcemap](https://github.com/mozilla/source-map/)

> Transform an LCOV file using sourcemaps.

---
## Wat?
* Run tests against transformed, concat'ed, etc. dist file
* Get code coverage per source file

---
## Install
Install with [npm](https://github.com/Tapad/lcov-sourcemap)

```
npm install --save-dev lcov-sourcemap
```

---
## Usage
```
var lcovSourcemap = require("lcov-sourcemap");
lcovSourcemap("./coverage/lcov-raw.info", {
	app: "./dist/js/app.js.map",
	others: "./dist/js/others.js.map"
}, "./src").then(function (lcov) {
    // lcov string
});

lcovSourcemap.writeLcov("./coverage/lcov-raw.info", {
	app: "./dist/js/app.js.map",
	others: "./dist/js/others.js.map"
}, "./src", "./coverage/lcov.info").then(function () {
    // Done!
});
```
### lcovSourcemap(lcovFilePath, sourcemaps, sourceDir)
* **lcovFilePath** (String): Lcov file.
* **sourcemaps** (Object | Array | String): Array or map of source map files or a string of one source map file.
* **sourceDir** (String): Source directory to look for files (checks for existence).
* _return_ (Promise): Promise containing Lcov string

### lcovSourcemap.writeLcov(lcovFilePath, sourcemaps, sourceDir, outputLcovFilePath)
* Arguments similar to `lcovSourceMap`
* **outputLcovFilePath** (String): Output lcov file path.
* _return_ (Promise): Resolves when write is complete

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