diff2html-cli
Advanced tools
Comparing version 0.2.0-2 to 0.2.0-3
{ | ||
"name": "diff2html-cli", | ||
"version": "0.2.0-2", | ||
"version": "0.2.0-3", | ||
@@ -59,3 +59,3 @@ "homepage": "https://www.github.com/rtfpessoa/diff2html-nodejs-cli", | ||
"pkginfo": "0.3.0", | ||
"diff2html": "0.2.0-6" | ||
"diff2html": "0.2.0-7" | ||
}, | ||
@@ -62,0 +62,0 @@ |
@@ -16,2 +16,4 @@ require('pkginfo')(module, 'version'); | ||
.option('-s, --side', 'Side by Side diff.') | ||
.option('-w, --word', 'Word by Word highlight.') | ||
.option('-c, --char', 'Char by Char highlight.') | ||
.option('-j, --json', 'Export diff in json format.'); | ||
@@ -75,9 +77,13 @@ | ||
var config = {}; | ||
config.wordByWord = program.word; | ||
config.charByChar = program.char; | ||
if (program.side) { | ||
return diff2Html.getPrettySideBySideHtmlFromDiff(input); | ||
return diff2Html.getPrettySideBySideHtmlFromDiff(input, config); | ||
} else if (program.json) { | ||
return JSON.stringify(diff2Html.getJsonFromDiff(input)); | ||
return JSON.stringify(diff2Html.getJsonFromDiff(input, config)); | ||
} else { | ||
return diff2Html.getPrettyHtmlFromDiff(input); | ||
return diff2Html.getPrettyHtmlFromDiff(input, config); | ||
} | ||
} |
11562
241
+ Addeddiff2html@0.2.0-7(transitive)
- Removeddiff2html@0.2.0-6(transitive)
Updateddiff2html@0.2.0-7