"File Harmony: Making Differences Visible with our CLI Tool"
Difference Generator is a Command Line Interface (CLI) utility designed to generate and display differences between two files. This tool can be particularly useful for developers who want to compare configuration files, JSON files, or any other structured data.
Supported files and formats:
- Input formats: .json, .yaml, .yml;
- Output formats: stylish, plain, JSON.
- Clone the repository:
git clone git@github.com:HaimOzer/frontend-project-46.git
; - Install project dependencies:
make install
; - Install the package with the utility locally:
npm link
.
After installation, you can learn how to use the utility using the gendiff command and the -h flag: gendiff -h
.
$ 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
-h, --help display help for command
-f --format
Report format. Possible values:
- stylish (default option)
Structured output. example - plain
Report in plain text. List includes only changed, added or deleted keys, unchanged keys are skipped. example - json
Output in json format. example
filepath1, filepath2
Path to files to compare. Both absolute and relative paths are acceptable.
Run the tests: make test
.
Run the linter: make lint
.
Put your files to fixtures directory and run - example gendiff file1.json file2.yaml
This project is licensed under the ISC License.
Feel free to customize the content based on your project's specific details and requirements.