View Source Igniter.Project.Application (igniter v0.3.45)
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.
Ordering
We will put the new child as the earliest item in the list that we can, skipping any modules
in after
.
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.