DalaDev.ServerDeps (dala_dev v0.4.0)

Copy Markdown View Source

Guards for the optional Phoenix dev-server dependencies.

phoenix_live_view and bandit are optional dependencies. Tasks that need them (mix dala.server, mix dala.web) call ensure_available!/0 to fail with an actionable message instead of a cryptic module-not-found error.

Summary

Functions

Returns true if the Phoenix dev-server dependencies are loadable.

Raises with an install hint if the dev-server deps are not available.

Functions

available?()

@spec available?() :: boolean()

Returns true if the Phoenix dev-server dependencies are loadable.

ensure_available!()

@spec ensure_available!() :: :ok

Raises with an install hint if the dev-server deps are not available.