Bundlex.Helper.MixHelper (Bundlex v0.5.1) 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

Specs

get_app!() :: atom()

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

Specs

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

Specs

get_priv_dir(application :: atom()) :: String.t()

Returns path to the priv dir for given application.

Specs

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

Returns root directory of the currently compiled project.

Link to this function

get_project_dir(application)

View Source

Specs

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

Returns root directory of the project of given application.