ex-yaml

1.0.5 • Public • Published

ex-yaml

CLI tool to extract values from a YAML file.
Useful for setting environment variables from YAML.

Installation

yarn add ex-yaml

Usage

Format:

ex-yaml <file> <name>

Sample usage with yarn:

PORT=$(yarn -s ex-yaml ./config.yaml my_port) ...

(Note the -s (--silent) flag, otherwise yarn's output will interfere.)

Equivalent result:

PORT=3000 ...

Example YAML file (config.yaml):

my_port: 3000

/ex-yaml/

    Package Sidebar

    Install

    npm i ex-yaml

    Weekly Downloads

    0

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    1.46 kB

    Total Files

    6

    Last publish

    Collaborators

    • bconnorwhite