Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust to tink_hxx#v1 #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extraParams.hxml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--macro coconut.react.Html.registerTags()
--macro coconut.react.Html.init()
4 changes: 2 additions & 2 deletions haxe_libraries/coconut.react-core.hxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @install: lix --silent download "gh://github.com/MVCoconut/coconut.react-core#1d3455cc0574f1d00d683fdccd875aae3ccc98de" into coconut.react-core/0.2.2/github/1d3455cc0574f1d00d683fdccd875aae3ccc98de
# @install: lix --silent download "gh://github.com/MVCoconut/coconut.react-core#acec63aec68858712924ed91258773bb33ab3544" into coconut.react-core/0.2.2/github/acec63aec68858712924ed91258773bb33ab3544
-lib coconut.ui
-lib react-next
-lib tink_priority
-cp ${HAXE_LIBCACHE}/coconut.react-core/0.2.2/github/1d3455cc0574f1d00d683fdccd875aae3ccc98de/src
-cp ${HAXE_LIBCACHE}/coconut.react-core/0.2.2/github/acec63aec68858712924ed91258773bb33ab3544/src
-D coconut.react-core=0.2.2
--macro coconut.react.macros.Setup.all()
-D coconut_react_core
3 changes: 1 addition & 2 deletions haxe_libraries/coconut.react-dom.hxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-D coconut.react-dom
-lib coconut.react-core
-lib tink_domspec
-cp src
extraParams.hxml
-cp src
4 changes: 2 additions & 2 deletions haxe_libraries/tink_hxx.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @install: lix --silent download "gh://github.com/haxetink/tink_hxx#0d6cda883d5ef4c1186dbad476e016b98aad68b8" into tink_hxx/0.25.0/github/0d6cda883d5ef4c1186dbad476e016b98aad68b8
# @install: lix --silent download "gh://github.com/haxetink/tink_hxx#62a00c12a3ba8d14ea6f0df18bdb31d80f6a0054" into tink_hxx/0.25.0/github/62a00c12a3ba8d14ea6f0df18bdb31d80f6a0054
-lib html-entities
-lib tink_anon
-lib tink_parse
-cp ${HAXE_LIBCACHE}/tink_hxx/0.25.0/github/0d6cda883d5ef4c1186dbad476e016b98aad68b8/src
-cp ${HAXE_LIBCACHE}/tink_hxx/0.25.0/github/62a00c12a3ba8d14ea6f0df18bdb31d80f6a0054/src
-D tink_hxx=0.25.0
8 changes: 4 additions & 4 deletions src/coconut/react/Html.macro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ import haxe.macro.Context;
import haxe.macro.Expr;
import tink.domspec.Macro.tags;
import tink.domspec.Macro.getAria;
using haxe.macro.Tools;
using tink.MacroApi;

class Html {

static function registerTags()
coconut.react.macros.HXX.defaults.whenever(tink.hxx.Tag.extractAllFrom(macro coconut.react.Html));

static var NAMELESS = '';

static var reactAttributes = {
Expand Down Expand Up @@ -101,4 +98,7 @@ class Html {
return ret;
}

static function init() {
Context.getType('coconut.react.Html').getClass();
}
}
5 changes: 3 additions & 2 deletions tests/RunTests.hx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package ;

import coconut.ui.*;
import coconut.react.Html.*;
import travix.Logger.*;

class RunTests {

static function main() {
try {

Renderer.mount(
cast js.Browser.document.createDivElement(),
coconut.Ui.hxx('<div>Hello, world!</div>')
Expand All @@ -19,7 +20,7 @@ class RunTests {
}
exit(0); // make sure we exit properly, which is necessary on some targets, e.g. flash & (phantom)js
}

}

class Example extends View {
Expand Down