distillery v2.0.0-rc.1 Mix.Releases.Config.Providers.Elixir

Provides loading of Elixir’s config.exs config file.

Link to this section Summary

Functions

Called when the provider is being asked to supply a value for the given key

Given a path to a config file, this function will return the quoted AST of that config and all configs that it imports

Link to this section Functions

Called when the provider is being asked to supply a value for the given key

Keys supplied to providers are a list of atoms which represent the path of the configuration key, beginning with the application name:

NOTE: This is currently unused, but provides an API for fetching config values from specific providers, which may come in handy down the road. A default implementation is provided for you, which fetches values from the application environment.

Examples

> MyProvider.get([:myapp, :server, :port])
{:ok, 8080}

> MyProvider.get([:maypp, :invalid, :key])
nil

Callback implementation for Mix.Releases.Config.Provider.get/1.

Link to this function read_quoted!(file)

Given a path to a config file, this function will return the quoted AST of that config and all configs that it imports.