Package Exports
- @cvrg-report/clover-json
- @cvrg-report/clover-json/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cvrg-report/clover-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
clover-json
Parse clover report files, and return a JSON representation in a lcov-parse compatible manner.
Installation
$ npm i @cvrg-report/clover-json --saveUsage
var clover = require("@cvrg-report/clover-json");
// Parse by file path
clover.parseFile("filepath.xml")
.then(function (result) {
console.log(JSON.stringify(result));
}).catch(function (err) {
console.error(err);
});
// Parse by file contents
clover.parseContent("<?xml version=\"1.0\" ?><coverage>...</coverage>")
.then(function (result) {
console.log(JSON.stringify(result));
}).catch(function (err) {
console.error(err);
});