yamloader

Recursively load YAML configuration files from a specified directory

Usage no npm install needed!

<script type="module">
  import yamloader from 'https://cdn.skypack.dev/yamloader';
</script>

README

Node.js CI

YAMLoader

A recursive YAML configuration file loader

yamLoader(dirPath, [recursive], [yamExt])

YAMLoader

Loads YAML configuration files recursively in a directory, and returns the object. Object keys are defined by the filename of the configuration file, with the extension removed. Uses filterByExtension and findFilesInDir.

By default, looks for extensions ".yaml" and ".yml". You can override the extensions by passing an array of extensions to capture.

Kind: global function

Param Type Default Description
dirPath string the directory path to load configuration files from
[recursive] boolean true whether the configuration load is recursive
[yamExt] Array.<string> [".yaml", ".yml"] an array of extensions to match files against