Moved hotswap code to lurker.hotswapfile()

This commit is contained in:
rxi
2014-03-07 21:00:39 +00:00
parent d677745576
commit db46fa0afa

View File

@@ -174,8 +174,7 @@ function lurker.exiterrorstate()
end end
function lurker.scan() function lurker.hotswapfile(f)
for _, f in pairs(lurker.getchanged()) do
lurker.print("Hotswapping '{1}'...", {f}) lurker.print("Hotswapping '{1}'...", {f})
if lurker.state == "error" then if lurker.state == "error" then
lurker.exiterrorstate() lurker.exiterrorstate()
@@ -193,7 +192,11 @@ function lurker.scan()
if lurker.protected then if lurker.protected then
lurker.updatewrappers() lurker.updatewrappers()
end end
end end
function lurker.scan()
lume.each(lurker.getchanged(), lurker.hotswapfile)
end end