added tree heads.json generator

This commit is contained in:
Anton Dyudin 2015-07-30 16:36:36 -07:00
parent 5e8bd1f2f5
commit 8039c0abba
5 changed files with 23 additions and 9 deletions

View File

@ -19,6 +19,7 @@
head/(react-to-json ;h1:"*{hed}")
body/(react-to-json ;div:"*{tal}")
~
++ react-head-json [%a (turn hed react-to-json)]
:: ++ js react-snip-js
++ react-snip-json (react-to-json elem)
++ mime [/application/json (tact tape)]

14
tree-gen/heads/json.hook Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hook/json/heads/tree-gen
::
/? 314
/$ |= [[bek=beak *] but=spur]
~&(scan/(tope bek ~)^`path`(flop but) ~)
/= dat /: /=== /% /react-head-json/
/= kid /: /%%/ /%
/; |=(a=(map span json) `json`[%o a])
/_ /json/
!:
::::
::
(jobe node/dat kids/kid ~)

6
tree/heads/json.hook Normal file
View File

@ -0,0 +1,6 @@
::
:::: /hook/json/heads/tree
::
/: /===tree-gen/heads /% 2 /json/
~! .
(joba %heads -.-)

View File

@ -13,7 +13,4 @@
%+ joba %kids
=- [%a (turn (~(tap by dat)) -)]
|= [a=span b=json]
%- jobe :~
name/s/a
body/b
==
(jobe name/s/a body/b ~)

View File

@ -38,8 +38,4 @@
=- [%a (turn (~(tap by dat)) -)]
|= [a=span b=json]
=+ fon=(json-front b)
%- jobe :~
meta/fon
name/s/a
body/b
==
(jobe meta/fon name/s/a body/b ~)