aboutsummaryrefslogtreecommitdiffstats
path: root/root/Tupdefault.lua
blob: 039edf0b7415bd42acdfd0bb49da3210fec95742 (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
local LUA_PATH = lua_path()
bundle = LUA_PATH .. ' moon ' .. build .. '/bundle_fileder.moon'
render = LUA_PATH .. ' moon ' .. build .. '/render_fileder.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 .. ' ' .. root .. ' %d ' .. inputs .. ' -- %<children>',
  { '$bundle.lua', '../<children>' }
)

tup.rule(
  '$bundle.lua',
  '^ HTML %d^ ' .. render .. ' ' .. root,
  'index.html'
)