View Source Kuddle.Config.DirectoryProvider (Kuddle Config v1.0.0)
Use Kuddle as a config provider for a directory, if you want to load a single file see Kuddle.Config.Provider instead
Example
defp releases do
[
application: [
config_providers: [
{Kuddle.Config.Provider, [
paths: [
{:system, "PATH_TO_CONFIG", "/default/path/to/kdl/config"}
],
extensions: [".kdl", ".kuddle"]
]}
]
]
]
end
Summary
Types
Specify a list of extensions that should be treated as kdl files.
Options supported by the DirectoryProvider
The directory provider allows specifying multiple paths to get config files from, this path will be joined with the wildcard */ and postfixed with the extensions.
Types
@type extensions_option() :: {:extensions, [String.t()]}
Specify a list of extensions that should be treated as kdl files.
Default: [".kdl"]
Example:
[
extensions: [".kdl", ".kuddle"]
]
@type option() :: paths_option() | extensions_option()
@type options() :: [option()]
Options supported by the DirectoryProvider
Example:
[
paths: [
"/etc/my_application/config"
],
extensions: [".cfg.kdl", ".cfg.kuddle"]
]
@type paths_option() :: {:paths, [Config.Provider.config_path()]}
The directory provider allows specifying multiple paths to get config files from, this path will be joined with the wildcard */ and postfixed with the extensions.
Example:
[
paths: [
"/etc/my_application/config"
]
]