Mix.Pow (Pow v1.0.25) View Source

Utilities module for mix tasks.

Link to this section Summary

Functions

Fetches the context base module for the app.

Fetches the library path for the context app.

Raises an exception if application doesn't have Ecto as dependency.

Raises an exception if application doesn't have Phoenix as dependency.

Raises an exception if the project is an umbrella app.

Parses argument options into a map.

Parses arguments into schema name and schema plural.

Link to this section Functions

Specs

app_base(atom()) :: atom()

Fetches the context base module for the app.

Link to this function

context_lib_path(ctx_app, rel_path)

View Source

Specs

context_lib_path(atom(), Path.t()) :: Path.t()

Fetches the library path for the context app.

Link to this function

ensure_ecto!(task, args)

View Source

Specs

ensure_ecto!(binary(), OptionParser.argv()) :: :ok

Raises an exception if application doesn't have Ecto as dependency.

Link to this function

ensure_phoenix!(task, args)

View Source

Specs

ensure_phoenix!(binary(), OptionParser.argv()) :: :ok

Raises an exception if application doesn't have Phoenix as dependency.

Specs

no_umbrella!(binary()) :: :ok

Raises an exception if the project is an umbrella app.

Link to this function

parse_options(args, switches, default_opts)

View Source

Specs

Parses argument options into a map.

Link to this function

schema_options_from_args(arg1 \\ [])

View Source

Specs

schema_options_from_args([binary()]) :: map()

Parses arguments into schema name and schema plural.