ExSync
Yet another Elixir reloader.
System Support
ExSync deps on FileSystem
Usage
Create a new application:
mix new my_appAdd exsync to your
mix.exsdependencies:
def deps do
[ {:exsync, "~> 0.2", only: :dev} ]
end-
Start your application the usual way, e.g.,
iex -S mix, then:
ExSync.start()-
(Alternative) Always start ExSync when available, add the following to an application’s
start/2:
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
case Code.ensure_loaded(ExSync) do
{:module, ExSync = mod} ->
mod.start()
{:error, :nofile} ->
:ok
end
# ... rest of your applications start script.
end
endUsage for umbrella project
Create an umbrella project
mix new my_umbrella_app --umbrellaAdd exsync to your
mix.exsdependencies:
def deps do
[ {:exsync, "~> 0.2", only: :dev} ]
endstart your umbrella project with
exsynctaskiex -S mix exsync
Config
-
add your own dirs to monitor, if you want monitor
privdir, use such config:
config :exsync, :addition_dirs, ["/priv"]- add your own extensions
config :exsync, :extensions, [".erl", ".hrl", ".ex", ".tpl"]