Skip to content

flowpl/lcov-sourcemap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transform an LCOV file using sourcemaps.

This is a for of Tapad/lcov-sourcemap that includes fixes to increase compatibility with newer versions of sourcemap


Wat?

  • Run tests against transformed, concat'ed, etc. dist file
  • Get code coverage per source file

Install

Install with npm

npm install --save-dev lcov-sourcemap-x

Usage

var lcovSourcemap = require("lcov-sourcemap-x");
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

About

Transform an LCOV file using sourcemaps.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%