aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mmmfs/init.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-11-01 09:01:49 +0000
committers-ol <s-ol@users.noreply.github.com>2018-11-01 09:01:49 +0000
commitfc181b154fb3f5cdefcf72c2a496b5b14f274e79 (patch)
tree5b4cfbebb4760fba68161265f07826b55206c311 /lib/mmmfs/init.moon
parentREHYDRATION (diff)
parentfaster time to first render (diff)
downloadmmm-fc181b154fb3f5cdefcf72c2a496b5b14f274e79.tar.gz
mmm-fc181b154fb3f5cdefcf72c2a496b5b14f274e79.zip
Merge branch 'root-mmmfs'
Diffstat (limited to 'lib/mmmfs/init.moon')
-rw-r--r--lib/mmmfs/init.moon27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/mmmfs/init.moon b/lib/mmmfs/init.moon
index bb26505..d0de45b 100644
--- a/lib/mmmfs/init.moon
+++ b/lib/mmmfs/init.moon
@@ -1,7 +1,34 @@
require = relative ...
import Key, Fileder from require '.fileder'
+import Browser from require '.browser'
+import tohtml from require 'lib.component'
+
+define_fileders = (...) ->
+ source_module = ...
+
+ (...) ->
+ with fileder = Fileder ...
+ .source_module = source_module
+
+rehydrate = (path) ->
+ import Browser from require 'lib.mmmfs.browser'
+ root = require 'root'
+ root\mount!
+
+ export BROWSER
+ BROWSER = Browser root, path, true
+
+render = (root, path) ->
+ export BROWSER
+ BROWSER = Browser root, path
+
+ content = tohtml BROWSER
+ content, on_client rehydrate, path
{
:Key
:Fileder
+ :render
+ :define_fileders
+ :module_roots
}