blob: 5cd45a96ecdbe23148120ac0a24b64f0ef46e099 (
plain)
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
|
LUA_PATH = {}
LUA_PATH += root .. '/?.lua'
LUA_PATH += root .. '/?.server.lua'
LUA_PATH += root .. '/?/init.lua'
LUA_PATH += root .. '/?/init.server.lua'
LUA_PATH = 'LUA_PATH="' .. table.concat(LUA_PATH, ';') .. '"'
bundle = LUA_PATH .. ' moon ' .. root .. '/bundle_fileder.moon'
render = LUA_PATH .. ' moon ' .. root .. '/render.moon'
-- @TODO: whish there was a better glob for this?
facets = tup.glob '*$*'
inputs = ''
for i, file in ipairs(facets) do
inputs = inputs .. " '" .. file .. "'"
end
facets += '<children>'
facets += root .. '/<modules>'
tup.rule(
facets,
'^ BNDL %d^ ' .. bundle .. ' %d ' .. inputs .. ' -- %<children>',
{ '$bundle.lua', '../<children>' }
)
tup.rule(
'$bundle.lua',
'^ HTML %d^ ' .. render .. ' ' .. root,
'index.html'
)
|