diff options
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>" |
