aboutsummaryrefslogtreecommitdiffstats
path: root/root/Tupdefault.lua
blob: e4e433c8dc7b3fe755b9a1afde6bbeecd2c9fdfa (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
facets = tup.glob '*'
inputs = ''
for i, file in ipairs(facets) do
  inputs = inputs .. " '" .. file .. "'"
end

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'

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'
)