Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/funkicide/frontend-project-lvl2
:computer: GenDiff - a .js library and a CLI tool that compares two configuration files and shows a difference. Supports .json and .yaml/.yml files.
https://github.com/funkicide/frontend-project-lvl2
Last synced: about 2 months ago
JSON representation
:computer: GenDiff - a .js library and a CLI tool that compares two configuration files and shows a difference. Supports .json and .yaml/.yml files.
- Host: GitHub
- URL: https://github.com/funkicide/frontend-project-lvl2
- Owner: Funkicide
- Created: 2022-06-03T08:24:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T15:25:30.000Z (over 2 years ago)
- Last Synced: 2024-05-28T19:35:47.792Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 337 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 💻 GenDiff
[![Actions Status](https://github.com/Funkicide/frontend-project-lvl2/workflows/hexlet-check/badge.svg)](https://github.com/Funkicide/frontend-project-lvl2/actions)
![Test-check](https://github.com/Funkicide/frontend-project-lvl2/actions/workflows/test-check.yml/badge.svg)
[![Maintainability](https://api.codeclimate.com/v1/badges/0f3bc2b06d4c737c3663/maintainability)](https://codeclimate.com/github/Funkicide/frontend-project-lvl2/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0f3bc2b06d4c737c3663/test_coverage)](https://codeclimate.com/github/Funkicide/frontend-project-lvl2/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:
```sh
git clone [email protected]:Funkicide/frontend-project-lvl2.git
cd frontend-project-lvl2
make install
npm link
```### As library:
```sh
npm i ./frontend-project-lvl2/
```## Usage
### As cli tool:
```sh
gendiff format filepath filepath
```
### As library:```sh
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