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
function lurker.scan()
for _, f in pairs(lurker.getchanged()) do
function lurker.hotswapfile(f)
lurker.print("Hotswapping '{1}'...", {f})
if lurker.state == "error" then
lurker.exiterrorstate()
@@ -194,6 +193,10 @@ function lurker.scan()
lurker.updatewrappers()
end
end
function lurker.scan()
lume.each(lurker.getchanged(), lurker.hotswapfile)
end