This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# @install: lix --silent download "git:https://k7izh9.gitea.cloud/NQN/hank#a7bd12074c88b29a58d68eba720c657f6a267cc6" into hank/0.0.8/git/a7bd12074c88b29a58d68eba720c657f6a267cc6
|
||||
# @run: haxelib run-dir hank "${HAXE_LIBCACHE}/hank/0.0.8/git/a7bd12074c88b29a58d68eba720c657f6a267cc6"
|
||||
-lib hscript
|
||||
-lib utest
|
||||
-cp ${HAXE_LIBCACHE}/hank/0.0.8/git/a7bd12074c88b29a58d68eba720c657f6a267cc6/
|
||||
-cp /Users/nat/repos/hank
|
||||
-D hank=0.0.8
|
||||
--macro Sys.println("haxe_libraries/hank.hxml:4: [Warning] Using dev version of library hank")
|
||||
@@ -13,7 +13,9 @@
|
||||
(localFunction elementFor [:Story story :Dynamic document]
|
||||
(let [:Dynamic d (document.createElement "div")]
|
||||
(loop
|
||||
(case (story.nextFrame)
|
||||
(case (try
|
||||
(story.nextFrame)
|
||||
(catch [e] (errorMessage "$e") Finished))
|
||||
((HasText t) (let [p (document.createElement "p")]
|
||||
(set p.innerHTML t)
|
||||
(d.appendChild p)))
|
||||
@@ -37,7 +39,9 @@
|
||||
->[document type data]
|
||||
(case type
|
||||
("choose"
|
||||
(story.choose data)
|
||||
(try
|
||||
(story.choose data)
|
||||
(catch [e] (errorMessage "$e")))
|
||||
(set document.body.innerHTML "")
|
||||
(document.body.appendChild (elementFor story document)))
|
||||
(never otherwise))))
|
||||
|
||||
Reference in New Issue
Block a user