An Arizona Framework plugin that integrates rebar3 functionality with the Arizona ecosystem for enhanced development workflows.
- Automatic rebar3 compilation when Erlang files change
- Configurable rebar3 profiles (test, dev, prod, etc.)
- Customizable file watching - directories, patterns, debounce timing
- Hot code reloading - automatically reloads changed modules in the running system
- Seamless integration with Arizona's reloader system
Add to your rebar.config:
{deps, [
{arizona_rebar3_plugin, {git, "https://github.com/arizona-framework/arizona_rebar3_plugin",
{branch, "main"}}}
]}.Configure the plugin in your sys.config:
[
{arizona, [
% ...
% Configure the rebar3 plugin with reloader feature
{plugins, [
{arizona_rebar3_plugin, #{
reloader => #{
profile => default, % rebar3 profile to use
directories => ["src"], % directories to watch
patterns => [".*\\.erl$"], % file patterns to match
debounce_ms => 100 % debounce timing
}
}}
]}
]}
].| Option | Type | Default | Description |
|---|---|---|---|
profile |
atom() |
default |
Rebar3 profile to use for compilation (test, dev, prod, etc.) |
directories |
[string()] |
["src"] |
List of directories to watch for changes |
patterns |
[string()] |
[".*\\.erl$"] |
Regex patterns for files to watch |
debounce_ms |
integer() |
100 |
Milliseconds to wait after file change before triggering reload |
-nominal config() :: #{reloader => reloader_config()}.
-nominal reloader_config() :: #{
profile => atom(),
directories => [string()],
patterns => [string()],
debounce_ms => integer()
}.- File Watching: Monitors specified directories for file changes
- rebar3 Compilation: Runs
rebar3 as <profile> compilewhen changes detected - Hot Code Loading: Automatically reloads changed modules using
code:purge/1andcode:load_file/1 - Development Feedback: Provides console output showing compilation results and reloaded modules
$ rebar3 as test compile
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling myapp
===> Reloading src/my_module.erl
===> Reloading src/another_module.erl$ rebar3 compile
$ rebar3 dialyzer- Erlang/OTP 27+
- Arizona Framework
- rebar3
Copyright (c) 2025 William Fank Thomé
Arizona is 100% open-source and community-driven. All components are available under the Apache 2 License on GitHub.
See LICENSE.md for more information.