{"id":20435970,"url":"https://github.com/d4nyll/mermal","last_synced_at":"2025-04-12T21:36:50.614Z","repository":{"id":26524922,"uuid":"109171648","full_name":"d4nyll/mermal","owner":"d4nyll","description":"Merge YAML files together","archived":false,"fork":false,"pushed_at":"2024-12-02T20:25:26.000Z","size":1024,"stargazers_count":8,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T15:48:09.575Z","etag":null,"topics":["merge","swagger","yaml"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d4nyll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-11-01T19:02:02.000Z","updated_at":"2024-02-04T17:45:20.000Z","dependencies_parsed_at":"2024-02-04T19:24:42.674Z","dependency_job_id":"b912fed7-32d9-4e60-a53b-434cad600086","html_url":"https://github.com/d4nyll/mermal","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fmermal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fmermal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fmermal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fmermal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d4nyll","download_url":"https://codeload.github.com/d4nyll/mermal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637721,"owners_count":21137534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["merge","swagger","yaml"],"created_at":"2024-11-15T08:38:40.606Z","updated_at":"2025-04-12T21:36:50.589Z","avatar_url":"https://github.com/d4nyll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI Build Status](https://github.com/d4nyll/mermal/actions/workflows/ci.yaml/badge.svg)](https://travis-ci.org/d4nyll/mermal) [![Maintainability](https://api.codeclimate.com/v1/badges/988aa7d648997b23e4f7/maintainability)](https://codeclimate.com/github/d4nyll/mermal/maintainability)\n\nMerges one or more YAML files into a base file.\n\n## Usage\n\n`mermal` is available on [npmjs.com](https://www.npmjs.com/package/mermal).\n\n`mermal` provides an \u003cabbr title=\"Application programming interface\"\u003eAPI\u003c/abbr\u003e as well as a \u003cabbr title=\"Command-line interface\"\u003eCLI\u003c/abbr\u003e.\n\n### Install\n\n```\n# Locally\n$ yarn add mermal   # Using yarn\n$ npm install mermal    # Using npm\n\n# Or globally\n$ yarn global add mermal   # Using yarn\n$ npm install -g mermal    # Using npm\n```\n\n### API\n\nAll API methods returns with a promise.\n\n#### Example\n\n```\nimport * as merge from 'mermal';\n\nconst base = `a:\n  b1: b1\n  b2: b2`;\n\nconst override = `a:\n  b1: b3\nc:\n  d1: d1`;\n\nmerge.toYaml(base, override)\n  .then(console.log);\n\n/**\n * Log will read:\n    a:\n      b1: b3\n      b2: b2\n    c:\n      d1: d1\n */\n\n```\n\n#### Available Methods\n\n##### `toFile`\n##### `toJson`\n##### `toYaml`\n\n### CLI\n\n#### Example\n\n```\n$ mermal -b base.yaml -s sub/ -o out.yaml\n```\n\n#### Options\n\n```\n-b, --base \u003cbaseFile\u003e     Path to the base YAML file where other files will be merged into\n-o, --out \u003coutFile\u003e       Path to the YAML file that will be exported to. It will override any existing files\n-s, --search \u003csearchDir\u003e  A directory that will be searched for\n-h, --help                output usage information\n```\n\nSee `mermal --help` for more options.\n\n## Comparison with other packages\n\n* [`merge-yaml`](https://github.com/skapoor/merge-yaml)\n  * Lacks extensive testing\n  * Throws error if the file could not be found\n  * Must specify the path of every file\n* [`swagger-yaml`](https://github.com/idlerun/swagger-yaml)\n  * Not available as a CLI\n  * Opinionated about where you place your source files\n\n## TODO\n\n* Improve Tests\n* More tests\n* Handle edge cases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fmermal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd4nyll%2Fmermal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fmermal/lists"}