Bundlex v0.2.0 Bundlex.Helper.MixHelper View Source

Module containing helper functions that ease retreiving certain values from Mix configuration files.

Link to this section Summary

Functions

Helper function for retreiving app name from mix.exs and failing if it was not found

Returns root directory of the currently compiled project

Returns root directory of the project of given application

Stores current project directory in an agent. This is necessary because Mix.Project.deps_paths/0 sometimes return invalid paths when dependencies are given by path (see https://github.com/elixir-lang/elixir/issues/7561). Such dependencies are always recompiled, thus proper path is always stored and can be retrieved by dependent projects

Link to this section Functions

Link to this function

get_app!() View Source
get_app!() :: atom()

Helper function for retreiving app name from mix.exs and failing if it was not found.

Link to this function

get_app!(module) View Source
get_app!(module()) :: atom()

Link to this function

get_priv_dir(app) View Source
get_priv_dir(atom()) :: String.t()

Returns root directory of the currently compiled project.

Link to this function

get_project_dir(application) View Source

Returns root directory of the project of given application.

Stores current project directory in an agent. This is necessary because Mix.Project.deps_paths/0 sometimes return invalid paths when dependencies are given by path (see https://github.com/elixir-lang/elixir/issues/7561). Such dependencies are always recompiled, thus proper path is always stored and can be retrieved by dependent projects.