Mix.install
install, go back to Mix module for more information.
Installs and starts dependencies.
The given deps should be in the same format as defined in a regular Mix
project. See mix help deps for more information. As a shortcut, an atom
can be given as dependency to mean the latest version. In other words,
specifying :decimal is the same as {:decimal, ">= 0.0.0"}.
After each successful installation, a given set of dependencies is cached
so starting another VM and calling Mix.install/2 with the same dependencies
will avoid unnecessary downloads and compilations. The location of the cache
directory can be controlled using the MIX_INSTALL_DIR environment variable.
This function can only be called outside of a Mix project and only with the same dependencies in the given VM.
Note: this feature is currently experimental and it may change in future releases.
Options
:force- iftrue, removes install cache. This is useful when you want to update your dependencies or your install got into an inconsistent state (Default:false):verbose- iftrue, prints additional debugging information (Default:false):consolidate_protocols- iftrue, runs protocol consolidation via themix compile.protocolstask (Default:true)
Examples
Mix.install([
:decimal,
{:jason, "~> 1.0"}
])