aboutsummaryrefslogtreecommitdiffstats
path: root/tup.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-11-06 05:55:32 +0000
committers-ol <s-ol@users.noreply.github.com>2018-11-06 05:57:09 +0000
commit5be83254486bef58f85f43dba719b674f0c3bc92 (patch)
tree519608d655497a60e47202504aaed6bd98655717 /tup.moon
parentmmm.component fix (diff)
downloadmmm-5be83254486bef58f85f43dba719b674f0c3bc92.tar.gz
mmm-5be83254486bef58f85f43dba719b674f0c3bc92.zip
implement mmmfs on real fs
Diffstat (limited to 'tup.moon')
-rw-r--r--tup.moon22
1 files changed, 9 insertions, 13 deletions
diff --git a/tup.moon b/tup.moon
index e489120..0b21610 100644
--- a/tup.moon
+++ b/tup.moon
@@ -21,9 +21,9 @@ enum_dir = do
-- COMPILE MOONSCRIPT
-- mmmfs tree
-for file in enum_dir 'root'
- basename = assert file\match '(.*)%.moon$'
- print ": #{file} |> ^ MOON %b > %o^ moonc -o %o %f |> dist/#{basename}.lua {root_src}"
+-- for file in enum_dir 'root'
+-- basename = assert file\match '(.*)%.moon$'
+-- print ": #{file} |> ^ MOON %b > %o^ moonc -o %o %f |> dist/#{basename}.lua {root_src}"
-- mmm
for file in enum_dir 'mmm'
@@ -33,26 +33,22 @@ for file in enum_dir 'mmm'
print ": #{file} |> ^ MOON %b > %o^ moonc -o %o %f |> dist/#{basename}.lua {mmm_src}"
-- GENERATE BUNDLES
-print ": {root_src} |> ^ BUNDLE root^ moon bundle.moon %o %f |> dist/root.bundle.lua"
+-- print ": {root_src} |> ^ BUNDLE root^ moon bundle.moon %o %f |> dist/root.bundle.lua"
print ": {mmm_src} |> ^ BUNDLE mmm^ moon bundle.moon %o %f |> dist/mmm.bundle.lua"
-- PRE-RENDER MMMFS
-import module_roots from require 'mmm.mmmfs'
+import load_fileder from require 'mmm.mmmfs.fs'
-root = require 'root'
+root = load_fileder!
root\mount!
-module_roots = {}
for fileder in coroutine.wrap root\iterate
name = fileder\gett 'name: alpha'
{ :path, :source_module } = fileder
- module_roots[source_module] or= fileder.path
- prefix_path = module_roots[source_module]
+ -- module_roots[source_module] or= fileder.path
+ -- prefix_path = module_roots[source_module]
path = '/' if path == ''
- if prefix_path
- print ": |> ^ HTML #{name}^ moon render.moon %o '#{path}' #{source_module} '#{prefix_path}' |> dist#{path}/index.html"
- else
- print ": |> ^ HTML #{name}^ moon render.moon %o '#{path}' |> dist#{path}/index.html"
+ print ": |> ^ HTML #{path}^ moon render.moon %o '#{path}' |> dist#{path}/index.html"