Igniter.Config (igniter v0.1.8)
Codemods and utilities for modifying Elixir config files.
Summary
Functions
Sets a config value in the given configuration file, updating it with updater
if it is already set.
Sets a config value in the given configuration file, if it is not already set.
Returns true
if the given configuration path is set somewhere after the provided zipper.
Modifies elixir configuration code starting at the configured zipper.
Functions
configure(igniter, file_name, app_name, config_path, value, updater \\ nil)
@spec configure( Igniter.t(), Path.t(), atom(), [atom()], term(), (Sourceror.Zipper.t() -> {:ok, Sourceror.Zipper.t()} | :error) | nil ) :: Igniter.t()
Sets a config value in the given configuration file, updating it with updater
if it is already set.
configure_new(igniter, file_path, app_name, config_path, value)
Sets a config value in the given configuration file, if it is not already set.
configures?(zipper, config_path, app_name)
@spec configures?(Sourceror.Zipper.t(), [atom()], atom()) :: boolean()
Returns true
if the given configuration path is set somewhere after the provided zipper.
modify_configuration_code(zipper, config_path, app_name, value, updater \\ nil)
@spec modify_configuration_code( Sourceror.Zipper.t(), [atom()], atom(), term(), (Sourceror.Zipper.t() -> {:ok, Sourceror.Zipper.t()} | :error) | nil ) :: Sourceror.Zipper.t()
Modifies elixir configuration code starting at the configured zipper.
If you want to set configuration, use configure/6
or configure_new/5
instead. This is a lower-level
tool for modifying configuration files when you need to adjust some specific part of them.