moonfig-yaml

    YAML adapter for MuVirus/moonfig.

    config
    yaml
    moonfig
    Download zip
    Author
    Version
    0.2.0
    License
    Apache-2.0
    Last updated
    16 hours ago
    Downloads
    9

    #moonfig-yaml

    YAML adapter for moonfig. It turns a YAML document into moonfig's Value, so merging, extraction and validation work exactly like they do for every other format.

    This lives in its own module so that moon add MuVirus/moonfig does not drag in the YAML parser. Add it only when you actually read YAML.

    #Install

    moon add MuVirus/moonfig-yaml

    import {
    "MuVirus/moonfig/core" @config,
    "MuVirus/moonfig-yaml/yaml_format" @yamlfmt,
    }

    let cfg = @config.Config::new()
    .add(@config.StringSource::new("port: 5432", @yamlfmt.YamlFormat::new()))
    .build()