From 21fb6583fa375a2971baca9f6b1b23f3350b2346 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Mon, 25 Jan 2016 14:51:28 -0800 Subject: [PATCH] module for tlak --- pub/module/main.js | 12 ++++++------ pub/module/mod.md | 1 - pub/module/mod/elem.hook | 1 + tree/hymn.hook | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 pub/module/mod.md create mode 100644 pub/module/mod/elem.hook diff --git a/pub/module/main.js b/pub/module/main.js index f6433dca1..65d5c4d52 100644 --- a/pub/module/main.js +++ b/pub/module/main.js @@ -1,6 +1,6 @@ -main = { - mount: function() { console.log('mount.') }, - unmount: function() { console.log('unmount.') } -} - -window.tree.modules.talk = main \ No newline at end of file +window.tree.components.talk = React.createClass({ + render: function() { + return (React.DOM.div({}, "rendered.")); + } +}) + \ No newline at end of file diff --git a/pub/module/mod.md b/pub/module/mod.md deleted file mode 100644 index 38ec42b4d..000000000 --- a/pub/module/mod.md +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/pub/module/mod/elem.hook b/pub/module/mod/elem.hook new file mode 100644 index 000000000..9f4d3cc8f --- /dev/null +++ b/pub/module/mod/elem.hook @@ -0,0 +1 @@ +;module(path "/home/pub/talk/main.js", component "talk"); \ No newline at end of file diff --git a/tree/hymn.hook b/tree/hymn.hook index ef0ecce67..ed2093541 100644 --- a/tree/hymn.hook +++ b/tree/hymn.hook @@ -29,7 +29,7 @@ ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"); ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.js"); ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js"); - ;script(type "text/javascript", src "/{dez}/lib/js/urb.js"); + ;script(type "text/javascript", src "/~/at/{dez}/lib/js/urb.js"); ;script(type "text/javascript", src "/{dez}/lib/js/hoon.js"); ;script(type "text/javascript", src "/{dez}/pub/tree/main.js"); ::;script(type "text/javascript", src "http://localhost:8000/docs/pub/tree/src/js/main.js");