Merges YAML files together using glob patterns to specify input files, with a CLI to write out the result as a file.
npm i -g merge-yaml-climerge-yaml -i example.yaml includes/*.yml -o merged.yml
const mergeYaml = require('merge-yaml-cli') mergeYaml.on('files', console.log('Files found: ', files)) const result = mergeYaml.merge(['example.yml', 'includes/*.yml'])
The repo contains one simple test case.
tests/base.yml is merged with
includes/*.yml and the output is compared with
The test can be run with
yarn test or
npm test but requires Docker and Docker Compose to be installed.