Skip to content

labuut/gendiff

Repository files navigation

Вычислитель отличий (project-lvl2-s185)

Небольшая cli-утилита для поиска отличий в конфигурационных файлах (json, yaml, ini).

$ gendiff before.json after.json

{
    host: hexlet.io
  + timeout: 20
  - timeout: 50
  - proxy: 123.234.53.22
  + verbose: true
  - follow: false
}

Build Status

Use:

install: sudo npm install -g gendiff-la.

gendiff before.json after.json - сравнение двух json-файлов.

gendiff before.yml after.yml - сравнение двух yaml-файлов.

gendiff before.ini after.ini - сравнение двух ini-файлов.

Flags:

--format - позволяет вывести дифф в плоском формате:

$ gendiff --format plain before.json after.json

Property 'timeout' was updated. From '50' to '20'
Property 'proxy' was removed
Property 'common.setting4' was removed
Property 'common.setting5' was removed
Property 'common.setting2' was added with value: 200
Property 'common.setting6.ops' was added with value: 'vops'
Property 'common.sites' was added with value: 'hexlet.io'
Property 'group1.baz' was updated. From 'bars' to 'bas'
Property 'group3' was removed
Property 'verbose' was added with value: true
Property 'group2' was added with complex value

--json - позволяет вывести дифф в виде json.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published