only run elixir code

ignore, for example, editor swapfiles
This commit is contained in:
Benjamin Chodoroff
2016-07-05 16:04:07 -04:00
parent 1880f10581
commit 87b5bb263c

View File

@@ -13,6 +13,7 @@ defmodule Watcher do
end end
defp reload(file) do defp reload(file) do
if Path.extname(file) == ".ex" do
try do try do
file file
|> normalize |> normalize
@@ -25,6 +26,7 @@ defmodule Watcher do
e -> Display.show_compile_error(e) e -> Display.show_compile_error(e)
end end
end end
end
defp normalize(file) do defp normalize(file) do
String.replace_suffix(file, "___jb_tmp___", "") String.replace_suffix(file, "___jb_tmp___", "")