via npm:
$ npm install diff-parser # use -g if you want to use diff2html$ git diff [file|dir] > filename.diff
$ diff2html path/to/filename.diff > filename.htmlvardiffParser=require("diff-parser");vardiffFiles=diffParser.parse(diffString);console.log(diffFiles);// here have all info you need.- Right now it only support git diff. So the next improvement should be support more type of diffs.
- Let user customize their styles for the diff html page.
MIT