https://github.com/nice-digital/file-diff-generator
Generates colourised differences between any kinds of files from two different sources and indicates if they were added, deleted or changed.
https://github.com/nice-digital/file-diff-generator
Last synced: 11 months ago
JSON representation
Generates colourised differences between any kinds of files from two different sources and indicates if they were added, deleted or changed.
- Host: GitHub
- URL: https://github.com/nice-digital/file-diff-generator
- Owner: nice-digital
- License: mit
- Created: 2020-11-10T17:52:29.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-12T18:31:20.000Z (over 5 years ago)
- Last Synced: 2025-02-25T22:12:23.785Z (over 1 year ago)
- Language: JavaScript
- Size: 131 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changed.png
- License: LICENSE
Awesome Lists containing this project
README
File Diff Generator
==================

---
## Installing
```bash
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

### Added file

### Deleted File

### 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
```bash
file-diff-generator --new=/root/new --old=/root/old --output=/root/output --outputFormat=side-by-side
```
```bash
file-diff-generator --new=/root/new --old=/root/old --output=/root/output merge=true
```
```bash
file-diff-generator --new=/root/new --old=/root/old --output=/root/output --regexReplacement='[{ regex: /build.1278/, replacement: \"\" }]'
```