Add basic file watcher to run koans
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user