View Source Igniter.Project.TaskAliases (igniter v0.3.76)
Codemods and utilities for interacting with task aliases in the mix.exs file
Summary
Functions
Adds an alias to the mix.exs file
Modifies an existing alias, doing nothing if it doesn't exist
Functions
@spec add_alias( Igniter.t(), atom() | String.t(), String.t() | [String.t()], opts :: Keyword.t() ) :: Igniter.t()
Adds an alias to the mix.exs file
Options
:if_exists
- How to alter the alias if it already exists. Options are::ignore
- Do nothing if the alias already exists. This is the default.:prepend
- Add the new alias to the beginning of the list.{:prepend, value}
- Add a different value than the originally supplied alias to the beginning of the list.:append
- Add the new alias to the end of the list.{:append, value}
- Add a different value than the originally supplied alias to the end of the list.:warn
- Print a warning if the alias already exists.
@spec modify_existing_alias( Igniter.t(), atom() | String.t(), (Sourceror.Zipper.t() -> {:ok, Sourceror.Zipper.t()} | :error) ) :: Igniter.t()
Modifies an existing alias, doing nothing if it doesn't exist