diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-11-06 07:19:59 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-11-06 07:19:59 +0000 |
| commit | a7e539c272ffcd9e14fb58f8c24714cdff8e7c17 (patch) | |
| tree | 404f92906bd402b1c394f7b521508b5138e76d98 /render.moon | |
| parent | inspect mode wip (diff) | |
| parent | add metadata for compilation (diff) | |
| download | mmm-a7e539c272ffcd9e14fb58f8c24714cdff8e7c17.tar.gz mmm-a7e539c272ffcd9e14fb58f8c24714cdff8e7c17.zip | |
Merge branch 'tru-fs' into inspect-mode
Diffstat (limited to 'render.moon')
| -rw-r--r-- | render.moon | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/render.moon b/render.moon index 90b85d3..66272ec 100644 --- a/render.moon +++ b/render.moon @@ -1,23 +1,17 @@ package.moonpath = './?.server.moon;./?/init.server.moon;' .. package.moonpath -import flush from require 'mmm.init' +require 'mmm.init' import render from require 'mmm.mmmfs' +import load_fileder from require 'mmm.mmmfs.fs' -- usage: --- moon render.moon <output> <fileder_path> [<prefix module> <prefix path>] -{ output_name, path, prefix_mod, prefix_path } = arg +-- moon render.moon <output> <fileder_path> +{ output_name, path } = arg assert output_name, "please specify the output filename as an argument" assert path, "please specify the path name to build as an argument" -root = if prefix_mod and prefix_path - -- prefix module and path are given, skip deeper into the tree - assert path\match '^' .. prefix_path - with require prefix_mod - \mount prefix_path, true -else - -- load full tree - with require 'root' - \mount! +root = load_fileder 'root' .. path +root\mount path content, rehydrate = render root, path assert content, "no content" |
