grunt-jscpd
grunt-jscpd copied to clipboard
output json or render to html
Have you thought about having json as an output? Using xml2js you can conver the output to json. Something as simple as taking the data from
var xml2js = require( 'xml2js' ).parseString, xmlFile = grunt.file.read( 'jscpd/jscpd.xml' ), beautify = require( 'js-beautify' )[ 'js_beautify' ];
xml2js( xmlFile, function ( err, result ) {
grunt.file.write( 'jscpd/jscpd.json', beautify( JSON.stringify( result ) ) );
} );
+1
Hey guys, check out this grunt task. It will create a nice HTML Output based on JSCPD output. https://github.com/linslin/grunt-jscpd-reporter