anvl_project ¶This module contains routines for managing ANVL projects.
-callback init(t()) -> term().
An optional callback that is executed after loading the plugins and project configuration. Project can use it, for example, to install hooks.
Project’s own ID is passed as an argument.
-callback conf_override(t()) -> lee:patch().
See Project Configuration Override
-callback conf() -> conf_tree().
-type
pre_project_load_hook() :: fun((file:filename()) -> _).
Not exported
-type conf_tree() :: #{atom() | [atom()] =>
conf_tree() | [conf_tree()] | term()}.
An opaque type uniquely identifying an ANVL project.
API consumers can compare values of t() for (in)equality,
but should not assume anything else about this type.
-spec is_project(file:filename()) -> boolean().
Return true if input directory is an ANVL project.
-spec add_pre_project_load_hook(integer(),
pre_project_load_hook()) -> ok.
-spec
add_pre_project_load_hook(pre_project_load_hook()) -> ok.
-spec plugins(Project :: t()) -> [anvl_plugin:t()].
-spec root_dir() -> file:filename().
Return directory of the root project.
Root project is the one where anvl was called.
-spec root() -> t().
-spec list_conf(t(), lee:model_key()) -> list().
List project configuration.
-spec maybe_conf(t(), lee:key()) -> {ok, _Result} |
undefined.
Get a value from project configuration, non-throwing version.
-spec conf(t(), lee:key()) -> term().
Get a value from project configuration.
-spec config_module(t()) -> module().
-spec project_of_dir(file:filename()) -> t().
Load a project located in the specified directory, and return project ID.
-spec dir(t()) -> file:filename().
Return directory containing a project.
-spec loaded(file:filename()) -> anvl_condition:t().
Condition: project configuarion is loaded.