-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompile.lua
41 lines (37 loc) · 827 Bytes
/
compile.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- httpserver-compile.lua
-- Part of nodemcu-httpserver, compiles server code after upload.
-- Author: Marcos Kirsch
local compileAndRemoveIfNeeded = function(f)
if file.exists(f) then
print('Compiling:', f)
node.compile(f)
file.remove(f)
collectgarbage()
end
end
local serverFiles = {
'obtn4.lua',
'web5.lua',
'web_tag4.lua',
'web_tag.lua',
'web_login.lua',
'web_is_tag.lua',
'web_control.lua',
'web_file.lua',
'web_request.lua',
'RC522.lua',
'functions.lua',
'tag4.lua',
'gen_list.lua',
'gen_list_c.lua',
'gen_export.lua',
'deletetags.lua',
'init1.lua',
'list_p.lua',
'list_s.lua',
'reader6.lua'
}
for i, f in ipairs(serverFiles) do compileAndRemoveIfNeeded(f) end
compileAndRemoveIfNeeded = nil
serverFiles = nil
collectgarbage()