# `Igniter.Project.TaskAliases`
[🔗](https://github.com/ash-project/igniter/blob/v0.8.3/lib/igniter/project/task_aliases.ex#L5)

Codemods and utilities for interacting with task aliases in the mix.exs file

# `add_alias`

```elixir
@spec add_alias(
  Igniter.t(),
  atom() | String.t(),
  String.t() | {:code, term()} | [String.t() | {:code, term()}],
  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 (if it is not already present).
- `{:prepend, value}` - Add a different value than the originally supplied alias to the beginning of the list (if it is not already present).
- `{:replace_or_append, old, new}` - If the old value is in the list, it is replaced with the new value. Otherwise the new value is appended (if it is not already present).
- `:append` - Add the new alias to the end of the list (if it is not already present).
- `{:append, value}` - Add a different value than the originally supplied alias to the end of the list (if it is not already present).
- `:warn` - Print a warning if the alias already exists.

# `modify_existing_alias`

```elixir
@spec modify_existing_alias(
  Igniter.t(),
  atom() | String.t(),
  (Sourceror.Zipper.t() -&gt; {:ok, Sourceror.Zipper.t()} | :error)
) :: Igniter.t()
```

Modifies an existing alias, doing nothing if it doesn't exist

---

*Consult [api-reference.md](api-reference.md) for complete listing*
