@nice-digital/file-diff-generator

1.0.4 • Public • Published

File Diff Generator

Icon


Installing

npm install file-diff-generator

What is it?

file-diff-generator generates colourised differences between any kinds of files from two different sources and indicates if they were added, deleted or changed.

The added, deleted or changed files are collated into the output folder with the adddition of a file called filesList.html which contains hyperlinks to the relevant files in the output directory. This is useful if the output needs to be rendered by a web server.

Changed file

Changed

Added file

Added

Deleted File

Deleted

Options

Usage:

file-diff-generator --new= NEW SOURCE --old= OLD SOURCE --output= DESTINATION [OPTIONS]

--outputFormat Whether to display the differences line-by-line or side-by-side (default: line-by-line)

--regexReplacement An array of regular expressions in JSON to replace text in source files (default: none)

--merge Whether to merge all the output files into a single file called allResults.html (default: false)

Usage Examples

file-diff-generator --new=/root/new --old=/root/old --output=/root/output --outputFormat=side-by-side
file-diff-generator --new=/root/new --old=/root/old --output=/root/output merge=true
file-diff-generator --new=/root/new --old=/root/old --output=/root/output --regexReplacement='[{ regex: /build.1278/, replacement: \"\" }]'
Icon made by Freepik from www.flaticon.com

Readme

Keywords

none

Package Sidebar

Install

npm i @nice-digital/file-diff-generator

Weekly Downloads

5

Version

1.0.4

License

MIT

Unpacked Size

185 kB

Total Files

62

Last publish

Collaborators

  • dalenice
  • wongcheming
  • johndavey72
  • barkertron
  • martingallagher1980
  • ditprogrammatic
  • ediblecode
  • josealmeida
  • mark-nice
  • nansenst
  • colin.mazurkiewicz
  • imranazad
  • eleanormollett