gulp-instrument

Gulp plugin for instrumenting code using jscoverage (or other instrumentation engine).

gulp-instrument

Gulp plugin for instrumenting code using jscoverage (or other instrumentation engine).

npm install --save gulp-instrument

In your gulpfile.js:

var gulp = require('gulp')
  , instrument = require('gulp-instrument');
 
gulp.task('instrument', function() {
  return gulp.src('lib/**.js')
    .pipe(instrument())
    .pipe(gulp.dest('lib-cov'));
});

Currently only jscoverage is supported, but support for other engines could be added easily if somebody would like to contribute.