Closed ORESoftware closed 6 years ago
I asked a question on SO about this too: https://stackoverflow.com/questions/47880168/instrumenting-files-on-the-fly-with-istanbul
I realize this is possible just by doing this:
app.use(function(req,res,next){
const k = cp.spawn('istanbul instrument foo.js');
k.stdout.pipe(res);
});
say we have an Express server:
is there a way to instrument a file like this on the fly, and serve it to the browser?