Browserify transform to instrument coffee src files with JSCoverage or Istanbul instrumentation
npm install browserify-coffee-coverageA browserify transform to take .coffee files and compile them into .js with coverage instrumentation using
coffee-coverage. coffee-coverage supports
istanbul and jscoverage
``javascript`
var coverage = require('browserify-coffee-coverage');
var b = browserify();
b.add('./foo.coffee');
var options = { noInit: false };
b.transform(coverage, options);
b.bundle();
You can pass anything that you would pass to the coffee-coverage constructor, as well as these specific transform
options.
coffee-coverage instruments your coffee with lines like __coverage__["./foo.coffee"].s[1]++;. For each file, it will__coverage__
produce the intialization code to make sure (In this case the istanbul global coverage var) is
properly setup. You can either choose to either have this initialization code inlined into the transformed file, or
omit it. There are cases where you might want to omit it, and grab it yourself.
defaults to false`.