GenDiff is a cli-app determines the difference between two data structures.
- Support for different input formats: json, yaml.
- Generating a report in the form stylish, json, plain.
- Must have npm installed.
- Node v21.4.0 or higher. The version can be found in terminal:
node -v
!!!Following commands must be run from the app directory!
- Clone the project repository:
git clone
. - Install dependencies:
make install
and thenmake lint
.
!!! Remember! All commands must be used in in terminal. The terminal must be run in app-directiry.
To view help information enter into you terminal: gendiff -h
.
Usage: gendiff [options] <filepath1> <filepath2>
Compares two configuration files and shows a difference.
Options:
-V, --version output the version number
-f, --format [type] output format (default: "stylish")
-h, --help display help for command
To view version enter into you terminal:gendiff -V
.
12.0.0
Pattern for command to run the app:
gendiff -f [format options] __fixtures__/<filepath1> _fixtures__/<filepath2>
<filepath1> <filepath2>
are your files from the directory __fixtures__
.
Options of format you can choose from:
- json
- plain
- stylish
Stylysh is a default format, if you need output in this format you can skip
-f
or--format
. You can see skip of this option in examples below.
Comparison of two flat JSON-files (example with skipping -f
or --format
).
Comparison of two flat YAML-files (example with skipping -f
or --format
).
STYLISH Comparison of two nested JSON-files
STYLISH Comparison of two nested YAML-files
PLAIN Comparison of two nested JSON-files
PLAIN Comparison of two nested YAML-files
JSON Comparison of two nested JSON-files
JSON Comparison of two nested YAML-files
To view code analysis run command: make lint
To view test-report run command: make test
To view test-coverage report run command: make test-coverage