View Source Igniter.Project.Deps (igniter v0.4.8)

Codemods and utilities for managing dependencies declared in mix.exs

Summary

Functions

Adds a dependency to the mix.exs file.

Gets the current dependency declaration in mix.exs for a given dependency.

Removes a dependency from mix.exs

Sets a dependency option for an existing dependency

Functions

add_dep(igniter, dep, opts \\ [])

Adds a dependency to the mix.exs file.

|> Igniter.Project.Deps.add_dep({:my_dependency, "~> X.Y.Z"})

Options

  • :yes? - Automatically answer yes to any prompts.
  • :append? - Append to the dependency list instead of prepending.
  • :error? - Returns an error instead of a notice on failure.

add_dependency(igniter, name, version, opts \\ [])

This function is deprecated. Use `add_dep/2` or `add_dep/3` instead..

get_dependency_declaration(igniter, name)

Gets the current dependency declaration in mix.exs for a given dependency.

remove_dep(igniter, name)

Removes a dependency from mix.exs

set_dep_option(igniter, name, key, quoted)

@spec set_dep_option(Igniter.t(), atom(), atom(), quoted :: term()) :: Igniter.t()

Sets a dependency option for an existing dependency