1.0.5 • Published 5 years ago
ex-yaml v1.0.5
ex-yaml
CLI tool to extract values from a YAML file.
Useful for setting environment variables from YAML.
Installation
yarn add ex-yamlUsage
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