Closed mbrevda closed 9 years ago
The idea is to use the gather task and then to write a Gulp task to take the output of that and process it.
You could add code like this to your gulpfile to achieve what you want to achieve:
var through2 = require('through2');
...
var processor = through2.obj(function (stats, enc, cb) {
console.log(stats);
cb();
},
function (cb) {
cb();
});
...
return gulp.src(['filesglob'], { read: false })
.pipe(cover.instrument(options))
.pipe(tester)
.pipe(cover.gather())
.pipe(processor);
...
I was not able to figure that from the documentation.
Brilliant, thanks! :+1:
How can I output a summary of coverage as text? Preferably, I'd like to pass the json output to a function so that I can pick the parts I want and console.log them. I tried playing with format/report but I was not able to. Am I missing something?