View Source Igniter.Project.Application (igniter v0.3.67)
Codemods and tools for working with Application modules.
Summary
Functions
Adds a new child to the children
list in the application file
Returns the name of the application module.
app_name()
deprecated
Returns the name of the current application.
Returns the name of the application.
Functions
@spec add_new_child( Igniter.t(), module() | {module(), {:code, term()}} | {module(), term()}, opts :: Keyword.t() ) :: Igniter.t()
Adds a new child to the children
list in the application file
To pass quoted code as the options, use the following format:
{module, {:code, quoted_code}}
i.e
{MyApp.Supervisor, {:code, quote do
Application.fetch_env!(:app, :config)
end}}
Options
after
- A list of other modules that this supervisor should appear after, or a function that takes a module and returnstrue
if this module should be placed after it.opts_updater
- A function that takes the current options (second element of the child tuple), and returns a new value. If the existing value of the module is not a tuple, the value passed into your function will be[]
. Your function must return{:ok, zipper}
or{:error | :warning, "error_or_warning"}
.
Ordering
We will put the new child as the earliest item in the list that we can, skipping any modules
in the after
option.
Returns the name of the application module.
This function is deprecated. Use `app_name/1` instead..
@spec app_name() :: atom()
Returns the name of the current application.
Returns the name of the application.