yaml-merge-cli

1.1.5 • Public • Published

yaml-merge-cli

Fork of merge-yaml-cli

Forked to update dependencies by @vuk, renamed to yaml-merge-cli to deploy to npm

Merges YAML files together using glob patterns to specify input files, with a CLI to write out the result as a file.

Global Usage

npm i -g yaml-merge-cli
merge-yaml -i example.yaml includes/*.yml -o merged.yml

Npx Usage

npm i -D yaml-merge-cli
npx merge-yaml -i example.yaml includes/*.yml -o merged.yml

Node.js API

const mergeYaml = require('merge-yaml-cli')

mergeYaml.on('files', console.log('Files found: ', files))

const result = mergeYaml.merge(['example.yml', 'includes/*.yml'])

Tests

The repo contains one simple test case. tests/base.yml is merged with includes/*.yml and the output is compared with expected.yml.

The test can be run with yarn test or npm test but requires Docker and Docker Compose to be installed.

Readme

Keywords

Package Sidebar

Install

npm i yaml-merge-cli

Weekly Downloads

78

Version

1.1.5

License

MIT

Unpacked Size

5.71 kB

Total Files

12

Last publish

Collaborators

  • matthewjumpsoffbuildings