tasks/cover.js
function coverFile(srcFile) {
      var srcCode = grunt.file.read(srcFile);
      Instrument = require('coverjs').Instrument;

      try {
        return new Instrument(srcCode, {name: srcFile}).instrument();
      } catch (e) {
        grunt.log.error('File ' + srcFile + ' could not be instrumented.');
        grunt.fatal(e, 3);
      }
    }
function coverFile(srcFile) {
      var srcCode = grunt.file.read(srcFile);
      Instrument = require('coverjs').Instrument;

      try {
        return new Instrument(srcCode, {name: srcFile}).instrument();
      } catch (e) {
        grunt.log.error('File ' + srcFile + ' could not be instrumented.');
        grunt.fatal(e, 3);
      }
    }
function coverFile ( srcFile ) { var srcCode = grunt . file . read ( srcFile ) ; Instrument = require ( 'coverjs' ) . Instrument ; try { return new Instrument ( srcCode , { name : srcFile } ) . instrument ( ) ; } catch ( e ) { grunt . log . error ( 'File ' + srcFile + ' could not be instrumented.' ) ; grunt . fatal ( e , 3 ) ; } }
Instruments the given source file.

@param srcFile
@return {String} Returns the instrumented source file as a string.
Instruments the given source file .