CommonX v0.2.1 ApplicationX View Source

Application module extended functions.

Link to this section Summary

Functions

List all available applications excluding system ones.

List all dependant applications excluding system ones. Does includes the given application.

List all available modules excluding system ones.

List all available modules for the given app[s] and dependencies of those apps. This excludes system modules.

Link to this section Functions

Link to this function

applications() View Source
applications() :: [atom()]

List all available applications excluding system ones.

This function is save to run in Mix.Tasks.

Example

Since :common_x does not have any dependencies:

iex> ApplicationX.applications
[:common_x]
Link to this function

applications(app) View Source
applications(atom() | [atom()]) :: [atom()]

List all dependant applications excluding system ones. Does includes the given application.

This function is save to run in Mix.Tasks.

Example

Since :common_x does not have any dependencies:

iex> ApplicationX.applications(:common_x)
[:common_x]

Duplicates are ignored and only returned once:

iex> ApplicationX.applications([:common_x, :common_x])
[:common_x]

Unknown applications are safe, but returned:

iex> ApplicationX.applications(:fake)
[:fake]

List all available modules excluding system ones.

This function is save to run in Mix.Tasks.

Example

Since :common_x does not have any dependencies:

iex> ApplicationX.modules
[ApplicationX, CommonX, EnumX, MacroX, MapX]
Link to this function

modules(app) View Source
modules(atom() | [atom()]) :: [module()]

List all available modules for the given app[s] and dependencies of those apps. This excludes system modules.

This function is save to run in Mix.Tasks.

Example

Normally system modules are excluded, but can be added by manually passing the respective system application:

iex> ApplicationX.modules(:logger)
[Logger, Logger.App, Logger.BackendSupervisor, Logger.Backends.Console,
  Logger.Config, Logger.ErlangHandler, Logger.ErrorHandler, Logger.Formatter,
  Logger.Translator, Logger.Utils, Logger.Watcher]

Duplicate applications are ignored:

iex> ApplicationX.modules([:logger, :logger])
[Logger, Logger.App, Logger.BackendSupervisor, Logger.Backends.Console,
  Logger.Config, Logger.ErlangHandler, Logger.ErrorHandler, Logger.Formatter,
  Logger.Translator, Logger.Utils, Logger.Watcher]

Unknown applications are safe to pass:

iex> ApplicationX.modules(:fake)
[]