only run elixir code
ignore, for example, editor swapfiles
This commit is contained in:
@@ -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___", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user