Add basic file watcher to run koans

This commit is contained in:
Uku Taht
2015-12-17 01:03:05 +00:00
parent cbede62727
commit 94ff8b63b4
4 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
defmodule Watcher do
use ExFSWatch, dirs: ["lib/koans"]
def callback(file, events) do
if Enum.member?(events, :modified) do
[{mod, _}] = Code.load_file(file)
Runner.run(mod)
end
end
end