grunt-template-jasmine-istanbul_src-main-js-template.js
function (sources, tmp) {
	var instrumenter = new istanbul.Instrumenter();
	var instrumentedSources = [];
	sources.forEach(function (source) {
		var instrumentedSource = instrumenter.instrumentSync(
				grunt.file.read(source), source);
		var tmpSource = source;
		// don't try to write "C:" as part of a folder name on Windows
		if (process.platform == 'win32') {
			tmpSource = tmpSource.replace(/^([a-z]):/i, '$1');
		}
		tmpSource = path.join(tmp, tmpSource);
		grunt.file.write(tmpSource, instrumentedSource);
		instrumentedSources.push(tmpSource);
	});
	return instrumentedSources;
}
function (sources, tmp) {
	var instrumenter = new istanbul.Instrumenter();
	var instrumentedSources = [];
	sources.forEach(function (source) {
		var instrumentedSource = instrumenter.instrumentSync(
				grunt.file.read(source), source);
		var tmpSource = source;
		// don't try to write "C:" as part of a folder name on Windows
		if (process.platform == 'win32') {
			tmpSource = tmpSource.replace(/^([a-z]):/i, '$1');
		}
		tmpSource = path.join(tmp, tmpSource);
		grunt.file.write(tmpSource, instrumentedSource);
		instrumentedSources.push(tmpSource);
	});
	return instrumentedSources;
}
function ( sources , tmp ) { var instrumenter = new istanbul . Instrumenter ( ) ; var instrumentedSources = [ ] ; sources . forEach ( function ( source ) { var instrumentedSource = instrumenter . instrumentSync ( grunt . file . read ( source ) , source ) ; var tmpSource = source ; // don't try to write "C:" as part of a folder name on Windows if ( process . platform == 'win32' ) { tmpSource = tmpSource . replace ( / ^([a-z]): / i , '$1' ) ; } tmpSource = path . join ( tmp , tmpSource ) ; grunt . file . write ( tmpSource , instrumentedSource ) ; instrumentedSources . push ( tmpSource ) ; } ) ; return instrumentedSources ; }
Instruments the specified sources and moves the instrumented sources to the
temporary location, recreating the original directory structure.

@private
@method instrument

@param {Array} sources The paths of the original sources
@param {String} tmp The path to the temporary directory

@return {Array} The paths to the instrumented sources
Instruments the specified sources and moves the instrumented sources to the temporary location recreating the original directory structure .