{"id":18583524,"url":"https://github.com/maxdome/yaml-config-lib","last_synced_at":"2025-05-16T05:09:44.274Z","repository":{"id":57305947,"uuid":"50514014","full_name":"maxdome/yaml-config-lib","owner":"maxdome","description":"Loads the given and existing .yml files","archived":false,"fork":false,"pushed_at":"2016-06-16T12:51:01.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T22:13:26.672Z","etag":null,"topics":[],"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/maxdome.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}},"created_at":"2016-01-27T14:45:50.000Z","updated_at":"2016-01-27T14:48:25.000Z","dependencies_parsed_at":"2022-09-16T01:00:46.971Z","dependency_job_id":null,"html_url":"https://github.com/maxdome/yaml-config-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fyaml-config-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fyaml-config-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fyaml-config-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fyaml-config-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxdome","download_url":"https://codeload.github.com/maxdome/yaml-config-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471048,"owners_count":22076587,"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":[],"created_at":"2024-11-07T00:23:25.114Z","updated_at":"2025-05-16T05:09:44.256Z","avatar_url":"https://github.com/maxdome.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis CI](https://travis-ci.org/maxdome/yaml-config-lib.svg?branch=master \"Travis CI\")]\n (https://travis-ci.org/maxdome/yaml-config-lib)\n[![Dependency Status](https://david-dm.org/maxdome/yaml-config-lib.svg)](https://david-dm.org/maxdome/yaml-config-lib)\n[![devDependency Status](https://david-dm.org/maxdome/yaml-config-lib/dev-status.svg)](https://david-dm.org/maxdome/yaml-config-lib#info=devDependencies)\n\n# Install\nRun ```npm i mxd-yaml-config-lib --save```\n\n# Example\n```javascript\nconst directory = __dirname + '/../config';\nconst config = require('mxd-yaml-config-lib')([\n  directory + '/all.yml',                                             // Global default config\n  directory + '/' + (process.env.NODE_ENV || 'development') + '.yml', // Environment default config\n  directory + '/local.yml'                                            // Config for the current instance\n]);\n```\n\n# Directory structure\n* config\n  * .gitignore - With content ```/local```\n  * all.yml - Global default config\n  * development.yml - Development default config\n  * production.yml - Production default config\n  * local.yml - Config for the current instance\n\n# Attention\nIf you overwrite a leap of a tree, the complete tree will be overwritten.\n\ne.g.:\n* Some defaults for database options in the ```all.yml```:\n```yaml\ndatabase:\n  connection: ''\n  options:\n    key: 'value'\n```\n* Overwrite only the connection part in the ```local.yml```:\n```yaml\ndatabase:\n  connection: 'url'\n```\n* The merged config will only have the connection part, not anymore the options part with the default options:\n```yaml\ndatabase:\n  connection: 'url'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdome%2Fyaml-config-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxdome%2Fyaml-config-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdome%2Fyaml-config-lib/lists"}