aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-11-24 07:11:58 +0000
committers-ol <s-ol@users.noreply.github.com>2018-11-24 07:11:58 +0000
commitd12add8d23ea8c1fead48b9385531d91dc381cb0 (patch)
treed727a713a090298f06c58cc9de944af078d32fb0
parentshow dates in blog (diff)
downloadmmm-d12add8d23ea8c1fead48b9385531d91dc381cb0.tar.gz
mmm-d12add8d23ea8c1fead48b9385531d91dc381cb0.zip
fix hyphens in fileder names
-rw-r--r--build/render_fileder.moon1
-rw-r--r--mmm/component/init.server.moon2
-rw-r--r--mmm/dom/init.server.moon2
-rw-r--r--mmm/mmmfs/browser.moon2
-rw-r--r--mmm/mmmfs/fileder.moon4
-rw-r--r--mmm/ordered.moon11
-rw-r--r--root/games/vision-training-kit/description: text$plain (renamed from root/games/vision_training_kit/description: text$plain)0
-rwxr-xr-xroot/games/vision-training-kit/icon: image$png.png (renamed from root/games/vision_training_kit/icon: image$png.png)bin16412 -> 16412 bytes
-rw-r--r--root/games/vision-training-kit/title: text$plain (renamed from root/games/vision_training_kit/title: text$plain)0
-rw-r--r--root/text$moonscript -> fn -> mmm$dom.moon1
10 files changed, 12 insertions, 11 deletions
diff --git a/build/render_fileder.moon b/build/render_fileder.moon
index f3bae31..b143f82 100644
--- a/build/render_fileder.moon
+++ b/build/render_fileder.moon
@@ -67,6 +67,7 @@ with io.open 'index.html', 'w'
<script src=\"/highlight.pack.js\"></script>
<script src=\"//cdnjs.cloudflare.com/ajax/libs/marked/0.5.1/marked.min.js\"></script>
<script src=\"//cdnjs.cloudflare.com/ajax/libs/svg.js/2.6.6/svg.min.js\"></script>
+ <!-- <script src=\"//platform.twitter.com/widgets.js\" charset=\"utf-8\"></script> -->
<script src=\"/fengari-web.js\"></script>
<script type=\"application/lua\" src=\"/mmm.bundle.lua\"></script>
<script type=\"application/lua\">require 'mmm'</script>
diff --git a/mmm/component/init.server.moon b/mmm/component/init.server.moon
index 300e3d7..7c7fb7e 100644
--- a/mmm/component/init.server.moon
+++ b/mmm/component/init.server.moon
@@ -98,7 +98,7 @@ class ReactiveElement
render: =>
b = "<#{@element}"
- for k,v in opairs @attrs
+ for k,v in opairs @attrs, nil, true
if 'table' == type v
tmp = ''
for kk, vv in opairs v
diff --git a/mmm/dom/init.server.moon b/mmm/dom/init.server.moon
index b0a8c85..fedd109 100644
--- a/mmm/dom/init.server.moon
+++ b/mmm/dom/init.server.moon
@@ -14,7 +14,7 @@ element = (element) -> (...) ->
attributes = {}
b = "<#{element}"
- for k,v in opairs attributes
+ for k,v in opairs attributes, nil, true
if k == 'style' and 'table' == type v
tmp = ''
for kk, vv in opairs v
diff --git a/mmm/mmmfs/browser.moon b/mmm/mmmfs/browser.moon
index dd1ab9e..ef5544b 100644
--- a/mmm/mmmfs/browser.moon
+++ b/mmm/mmmfs/browser.moon
@@ -80,7 +80,7 @@ class Browser
\append path_segment 'root', ''
while path
- name, rest = path\match '^([%w-_%.]+)/(.*)'
+ name, rest = path\match '^([%w%-_%.]+)/(.*)'
if not name
name = path
diff --git a/mmm/mmmfs/fileder.moon b/mmm/mmmfs/fileder.moon
index 114ec75..019a814 100644
--- a/mmm/mmmfs/fileder.moon
+++ b/mmm/mmmfs/fileder.moon
@@ -72,10 +72,10 @@ class Fileder
-- * path - the path to walk to
walk: (path) =>
-- early-out if we are outside of the path already
- return unless path\match '^' .. @path
+ return unless @path == path\sub 1, #@path
-- gotcha
- return @ if path == @path
+ return @ if #path == #@path
for child in *@children
result = child\walk path
diff --git a/mmm/ordered.moon b/mmm/ordered.moon
index 59c07bf..cdb0e29 100644
--- a/mmm/ordered.moon
+++ b/mmm/ordered.moon
@@ -1,7 +1,7 @@
-- ordered table iterator, for stable(r) renderers
-sort = (t, order_fn) ->
- with index = [k for k,v in pairs t when 'string' == type k]
+sort = (t, order_fn, only_strings) ->
+ with index = [k for k,v in pairs t when (not only_strings) or 'string' == type k]
table.sort index, order_fn
-- ordered next(t)
@@ -12,12 +12,13 @@ onext = (state, key) ->
if key = index[i]
key, t[key]
--- ordered pairs(t). order_fn is optional; see table.sort
-opairs = (t, order_fn) ->
+-- ordered pairs(t).
+-- order_fn is optional; see table.sort
+opairs = (t, order_fn, only_strings=false) ->
state = {
:t,
i: 0,
- index: sort t, order_fn
+ index: sort t, order_fn, only_strings
}
onext, state, nil
diff --git a/root/games/vision_training_kit/description: text$plain b/root/games/vision-training-kit/description: text$plain
index 0511e77..0511e77 100644
--- a/root/games/vision_training_kit/description: text$plain
+++ b/root/games/vision-training-kit/description: text$plain
diff --git a/root/games/vision_training_kit/icon: image$png.png b/root/games/vision-training-kit/icon: image$png.png
index ef73861..ef73861 100755
--- a/root/games/vision_training_kit/icon: image$png.png
+++ b/root/games/vision-training-kit/icon: image$png.png
Binary files differ
diff --git a/root/games/vision_training_kit/title: text$plain b/root/games/vision-training-kit/title: text$plain
index d131a1c..d131a1c 100644
--- a/root/games/vision_training_kit/title: text$plain
+++ b/root/games/vision-training-kit/title: text$plain
diff --git a/root/text$moonscript -> fn -> mmm$dom.moon b/root/text$moonscript -> fn -> mmm$dom.moon
index f1e8ce1..7841095 100644
--- a/root/text$moonscript -> fn -> mmm$dom.moon
+++ b/root/text$moonscript -> fn -> mmm$dom.moon
@@ -1,5 +1,4 @@
import article, h1, h3, div, b, p, a, br, ul, tt, li, img from require 'mmm.dom'
-import opairs from require 'mmm.ordered'
=>
append, finish = do