diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-10-31 08:52:16 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-10-31 08:52:16 +0000 |
| commit | b99de1d4e79e6c4a548d9dddca730eaeeb63a1c9 (patch) | |
| tree | 1b34fd16a46d2567f7e767d9f260ad238bea0ef9 /lib/init.server.moon | |
| parent | REHYDRATION (diff) | |
| download | mmm-b99de1d4e79e6c4a548d9dddca730eaeeb63a1c9.tar.gz mmm-b99de1d4e79e6c4a548d9dddca730eaeeb63a1c9.zip | |
almost there tbh
Diffstat (limited to 'lib/init.server.moon')
| -rw-r--r-- | lib/init.server.moon | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/init.server.moon b/lib/init.server.moon index f81a2dc..198c64e 100644 --- a/lib/init.server.moon +++ b/lib/init.server.moon @@ -1,4 +1,4 @@ -export MODE, print, warn, relative, append, on_client +export MODE, print, warn, relative, on_client MODE = 'SERVER' deep_tostring = (tbl, space='') -> @@ -38,18 +38,13 @@ relative = do name = base .. name if '.' == name\sub 1, 1 _require name --- shorthand to append elements to body -buffer = '' -append = (val) -> - buffer ..= val - import compile, insert_loader from require 'lib.duct_tape' insert_loader! on_client = (fn, ...) -> args = {...} -- warn code - append "<script type=\"application/lua\"> + "<script type=\"application/lua\"> local fn = #{compile fn} fn(#{table.concat [string.format '%q', v for v in *args ], ', '}) </script>" |
