diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-10-18 14:16:10 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-10-18 14:16:10 +0000 |
| commit | 8844d29223626240ff99a0cdaccf1ee5a36cb3f6 (patch) | |
| tree | 1740fd0291959aa8d3d0b266158d7eaaa685224d /client.moon | |
| parent | update dependencies (diff) | |
| download | mmm-8844d29223626240ff99a0cdaccf1ee5a36cb3f6.tar.gz mmm-8844d29223626240ff99a0cdaccf1ee5a36cb3f6.zip | |
towards self-compiling
Diffstat (limited to 'client.moon')
| -rw-r--r-- | client.moon | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/client.moon b/client.moon new file mode 100644 index 0000000..d6fd433 --- /dev/null +++ b/client.moon @@ -0,0 +1,26 @@ +export MODE, print, warn, relative, append, on_client +export window, document + + +window = js.global +document = window.document + +MODE = 'CLIENT' +print = window.console\log +warn = window.console\warn + +print 'path is' +print package.path + +package.path = './?.shared.lua;./?.client.lua;' .. package.path + +-- relative imports +relative = (...) -> + path = ... + + (name) -> + name = path .. name if '.' == name\sub 1, 1 + require name + +append = document.body\appendChild +on_client = (f, ...) -> f ... |
