Repository navigation
Releases: arizona-framework/arizona_watcher_fs
Release list
0.1.0
The first release of the fs-based file watcher for Arizona's dev-mode hot reload. Arizona 0.4 defines the watcher as the arizona_watcher behaviour and ships no implementation, so a production build never carries a file-system dependency; this package is the implementation you add for development (inotify on Linux, FSEvents on macOS, the Windows API on Windows).
Getting started
Add it to a dev-only profile, so a production release never pulls it (or fs) in:
{profiles, [
{dev, [
{deps, [arizona_watcher_fs]}
]}
]}.and name it as the reloader's watcher in your dev config:
[{arizona, [
{reloader, #{
enabled => true,
watcher => arizona_watcher_fs,
rules => [
#{directory => "src", patterns => [".*\\.erl$"],
callback => fun arizona_reloader:reload_erl/1}
]
}}
]}].A path counts as changed on created, modified, deleted or renamed, so editors that save by renaming a temp file over the target trigger a reload. A dev release adds {arizona_watcher_fs, load} and {fs, load} to its relx release (see the README).
Requires Erlang/OTP 29+ and Arizona 0.4 or newer. On Linux, fs needs inotifywait (the inotify-tools package).
What's Changed
- Depend on arizona 0.4 from Hex by @williamthome in #1
New Contributors
- @williamthome made their first contribution in #1
Full Changelog: https://github.com/arizona-framework/arizona_watcher_fs/commits/0.1.0