Skip to content

💻 GenDiff - a .js library and a CLI tool that compares two configuration files and shows a difference. Supports .json and .yaml/.yml files.

Notifications You must be signed in to change notification settings

Funkicide/frontend-project-lvl2

Repository files navigation

💻 GenDiff

Actions Status Test-check Maintainability Test Coverage

❓ What is GenDiff?

GenDiff is a .js library and a CLI tool that compares two configuration files and shows a difference. Supports .json and .yaml/.yml files.

Available ouput formats:

  • stylish - default
  • plain
  • json

System requirements

  • NodeJS >= 12 <= 18
  • NPM >= 6.x
  • Make

🔧 Setup

As cli tool:

git clone [email protected]:Funkicide/frontend-project-lvl2.git
cd frontend-project-lvl2
make install
npm link

As library:

npm i ./frontend-project-lvl2/

Usage

As cli tool:

gendiff format filepath filepath

As library:

import genDiff from '@hexlet/code'

genDiff(filepath, filepath, formatName)

Usage demos:

Gendiff shallow .json files demo:

https://asciinema.org/a/025xyRo7zDOc7X4jkHAHMzg2T

Gendiff shallow .yaml files demo:

https://asciinema.org/a/v1GmUx7SbphdtxJI1GcO1u2EZ

Gendiff nested files demo (Stylish):

https://asciinema.org/a/mKEWurhrhGnKg6kMGouRbalVz

Gendiff nested files demo (Plain):

https://asciinema.org/a/jIoAS9Lr6r6zneOiY7KyaofGK

Gendiff nested files demo (JSON):

https://asciinema.org/a/MGURcOolGoRbPqCUkLobtOxOo

About

💻 GenDiff - a .js library and a CLI tool that compares two configuration files and shows a difference. Supports .json and .yaml/.yml files.

Resources

Stars

Watchers

Forks