Created
May 28, 2014 12:58
-
-
Save earnubs/ccef04e87be6e151a0d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
grunt.registerMultiTask('blanket', 'Instrument files with Blanket.js', function() { | |
var blkt = require("blanket")({ | |
"data-cover-flags": ['*.js'] | |
}); | |
this.files.forEach( function ( f ) { | |
f.src.forEach( function ( filepath ) { | |
blkt.instrument({ | |
inputFile: grunt.file.read(filepath), | |
inputFileName: filepath.src | |
}, function ( instrumented ) { | |
grunt.file.write( f.dest, instrumented ); | |
grunt.log.writeln( 'File ' + f.dest + ' instrumented.' ); | |
}); | |
}); | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment