Skip to content

miley777/frontend-project-46

Repository files navigation

Hexlet tests and linter status:

Actions Status Maintainability Test Coverage

GenDiff cli-app


App Description

GenDiff is a cli-app determines the difference between two data structures.

App capabilities:

  • Support for different input formats: json, yaml.
  • Generating a report in the form stylish, json, plain.

Minimum system requirements

  • Must have npm installed.
  • Node v21.4.0 or higher. The version can be found in terminal: node -v

Installation

!!!Following commands must be run from the app directory!

  1. Clone the project repository: git clone.
  2. Install dependencies: make install and then make lint.

Usage

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

Exapmles

Comparison of two flat JSON-files (example with skipping -f or --format).

asciicast

Comparison of two flat YAML-files (example with skipping -f or --format).

asciicast

STYLISH Comparison of two nested JSON-files

asciicast

STYLISH Comparison of two nested YAML-files

asciicast

PLAIN Comparison of two nested JSON-files

asciicast

PLAIN Comparison of two nested YAML-files

asciicast

JSON Comparison of two nested JSON-files

asciicast

JSON Comparison of two nested YAML-files

asciicast

Test

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published