Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/42BV/yml-sorter
Sorts yml files alphabetically
https://github.com/42BV/yml-sorter
command-line sort-yml-files utility yml
Last synced: about 2 months ago
JSON representation
Sorts yml files alphabetically
- Host: GitHub
- URL: https://github.com/42BV/yml-sorter
- Owner: 42BV
- Created: 2017-07-06T07:59:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T06:38:34.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T21:28:24.821Z (8 months ago)
- Topics: command-line, sort-yml-files, utility, yml
- Language: JavaScript
- Size: 568 KB
- Stars: 17
- Watchers: 13
- Forks: 8
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# About
This is a tool which allows you to sort yml files via a CLI.
The tool is basically a tiny wrapper around the great [js-yaml](https://github.com/nodeca/js-yaml).
# Installation
`npm install -g yml-sorter`
# Usage
```
Usage: yml-sorter [options]Options:
--input, -i The yml file which needs to be sorted [required]
--output, -o The file to wich to write the output
--dry-run, -d Only outputs the proposed sort to the terminal [default: false]
--indent, --id Indentation width to use (in spaces) [default: 2]
-h, --help Show help [boolean]Examples:
yml-sorter --input application-yml Sorts the file application.yml alphabetically.
yml-sorter --input application-yml --output dragons.yml Sorts and writes the output to dragons.yml
yml-sorter --input application-yml --dry-run Writes the output to the terminal
yml-sorter --input application-yml --indent 4 Indent with 4 spacesWith love from 42.nl
```