Bundlex v0.2.5 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 app for the given module. In case of failure fallbacks to get_app!/0

Returns path to the priv dir for given application

Returns root directory of the currently compiled project

Returns root directory of the project of given application

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()

Returns app for the given module. In case of failure fallbacks to get_app!/0.

Link to this function

get_priv_dir(application \\ get_app!()) View Source
get_priv_dir(application :: atom()) :: String.t()

Returns path to the priv dir for given application.

Link to this function

get_project_dir() View Source
get_project_dir() :: {:ok, binary()}

Returns root directory of the currently compiled project.

Link to this function

get_project_dir(application) View Source
get_project_dir(application :: atom()) ::
  {:ok, binary()} | {:error, :unknown_application}

Returns root directory of the project of given application.