Recompiles mix project on any file change/addition (defaults to only watching lib).
Intended for development use only.
Add remix to deps:
defp deps do
[{:remix, "~> 0.0.1", only: :dev}]
endAdd add :remix as a development only OTP app.
def application do
[applications: applications(Mix.env)]
end
defp applications(:dev), do: applications(:all) ++ [:remix]
defp applications(_all), do: [:logger]dirs(default"lib"): A list of directories to search, or binary of a single directoryescript(defaultfalse): includes escript compilationsilent(defaultfalse): suppress output to iex when compiling
Watches all files in project, with escript compilation and silent mode:
config :remix,
dirs: "./",
escript: true,
silent: trueWatches the lib and foo directories
config :remix,
dirs: ["lib", "foo"]Save or create a new file in the lib (or other specified) directory. Thats it!
Co-authored by the Agilion team during a Brown Bag Beers learning session as an exploration into Elixir, OTP, and recursion.
Remix source code is released under the Apache 2 License. Check LICENSE file for more information.