Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 676 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 676 Bytes

Diff Parser for Node

Installation

via npm:

$ npm install diff-parser # use -g if you want to use diff2html

Usage

Command Line

$ git diff [file|dir] > filename.diff
$ diff2html path/to/filename.diff > filename.html

Node

var diffParser = require("diff-parser");
var diffFiles = diffParser.parse(diffString);
console.log(diffFiles); // here have all info you need.

TODO

  • 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.

License

MIT