only run elixir code
ignore, for example, editor swapfiles
This commit is contained in:
@@ -13,16 +13,18 @@ defmodule Watcher do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp reload(file) do
|
defp reload(file) do
|
||||||
try do
|
if Path.extname(file) == ".ex" do
|
||||||
file
|
try do
|
||||||
|> normalize
|
file
|
||||||
|> Code.load_file
|
|> normalize
|
||||||
|> Enum.map(&(elem(&1, 0)))
|
|> Code.load_file
|
||||||
|> Enum.find(&Runner.koan?/1)
|
|> Enum.map(&(elem(&1, 0)))
|
||||||
|> Runner.modules_to_run
|
|> Enum.find(&Runner.koan?/1)
|
||||||
|> Runner.run
|
|> Runner.modules_to_run
|
||||||
rescue
|
|> Runner.run
|
||||||
e -> Display.show_compile_error(e)
|
rescue
|
||||||
|
e -> Display.show_compile_error(e)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user