# cli-gen_diff

> Compares two configuration files and shows a difference.

Latest version **1.0.0** (published 2020-06-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install cli-gen_diff
pnpm add cli-gen_diff
yarn add cli-gen_diff
bun add cli-gen_diff
```

Provides the command `gendiff`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-06-05 |
| First published | 2020-06-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 4 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yurii Tkachuk |
| Maintainers | portal-x |

## Links

- npm: https://www.npmjs.com/package/cli-gen_diff
- Repository: https://github.com/portal-x/backend-project-lvl2
- Homepage: https://github.com/portal-x/backend-project-lvl2#readme
- Issues: https://github.com/portal-x/backend-project-lvl2/issues
- npm.io page: https://npm.io/package/cli-gen_diff

## Dependencies (4)

- [ini](https://npm.io/package/ini.md) ^1.3.5
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.13.1
- [commander](https://npm.io/package/commander.md) ^5.1.0

## Recent versions

- 1.0.0 (latest) — 2020-06-05

## README

# PROJECT 'Generate difference'

[![Build Status](https://travis-ci.org/portal-x/backend-project-lvl2.svg?branch=master)](https://travis-ci.org/portal-x/backend-project-lvl2)
[![Maintainability](https://api.codeclimate.com/v1/badges/413a2f24806cbc5270d3/maintainability)](https://codeclimate.com/github/portal-x/backend-project-lvl2/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/413a2f24806cbc5270d3/test_coverage)](https://codeclimate.com/github/portal-x/backend-project-lvl2/test_coverage)

gendiff compares two configuration files and shows difference.
The package can be used as CLI utility or Node.js package that can be used in your project.

gendiff supports file extensions such as json, yaml, yml, ini. It can output the result in 'tree' and 'plain' formats. It's also possible to output in json format for data exchange using the json option. You can select the output format by setting the option flag -f (--format). By default output format 'tree'.

For example:

```bash
$ gendiff --format plain project/configurations/before.json project/configurations/after.json
```

or

```bash
$ gendiff project/configurations/before.ini project/configurations/after.ini
```

[![asciicast](https://asciinema.org/a/wqiAl0MuWK2Ntixk9XQKkNS5D.svg)](https://asciinema.org/a/wqiAl0MuWK2Ntixk9XQKkNS5D)
[![asciicast](https://asciinema.org/a/DjwYoe9T8EP9Zf9hEgxo28WOe.svg)](https://asciinema.org/a/DjwYoe9T8EP9Zf9hEgxo28WOe)
[![asciicast](https://asciinema.org/a/ONHRxftuhPFNoiG4COiVs9Dyx.svg)](https://asciinema.org/a/ONHRxftuhPFNoiG4COiVs9Dyx)
[![asciicast](https://asciinema.org/a/PgTyYQfxYbEe7algKv3qUjt8m.svg)](https://asciinema.org/a/PgTyYQfxYbEe7algKv3qUjt8m)

## Setup

```sh
$ git clone https://github.com/portal-x/backend-project-lvl2.git
$ make install
$ npm link
```

## gendiff module for node.js

```sh
$ npm install gendiff
```

## API

gendiff supports file extensions such as json, yaml, yml, ini. It can output the result in 'tree' and 'plain' formats. It's also possible to output in json format for data exchange. Set the json in parameter. By default output format 'tree'.

For example:

```sh
import gendiff from 'gendiff';

const diff = gendiff('./forExample/before.json', '/user/documents/after.json', 'json');

```

---
_Source: https://npm.io/package/cli-gen_diff · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
