blob: 283672e3d73a45d61ca3634123c955e4301b5a79 (
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
32
|
package.moonpath = './?.server.moon;' .. package.moonpath
export MODE, warn, append
MODE = 'SERVER'
warn = (...) ->
io.stderr\write table.concat { ... }, '\t'
io.stderr\write '\n'
-- shorthand to append elements to body
buffer = ''
append = (val) ->
buffer ..= val
flush = ->
with x = buffer
buffer = ''
import insert_loader from require 'duct_tape'
insert_loader!
error "please specify the module to build as an argumnet" unless arg[1]
require "app.#{arg[1]}"
print "<!DOCTYPE html>
<html>
<head>
<title>MMM: lunar low-gravity scripting playground</title>
</head>
<body>
#{flush!}
</body>
</html>"
|