grunt-jscpd icon indicating copy to clipboard operation
grunt-jscpd copied to clipboard

output json or render to html

Open joseph-jja opened this issue 10 years ago • 2 comments

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 ) ) );
    } );

joseph-jja avatar Sep 23 '14 17:09 joseph-jja

+1

tiriana avatar Dec 03 '14 11:12 tiriana

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

linslin avatar Jan 12 '15 08:01 linslin