emmet-hyperscript
Emmet-style syntactic sugar for HyperScript and virtual-hyperscript.
Inspired by HtmlElement.
Examples
Plain HyperScript:
const h = require("hyperscript");
h(
"div#page",
h(
"div#header",
h("h1.classy", "Example", {style: {"background-color": "#22f"}})
)
);
emmet-hyperscript:
const h = require("hyperscript");
const eh = require("emmet-hyperscript")(h);
eh(
"div#page > div#header > h1.classy",
"Example",
{style: {"background-color": "#22f"}}
);
It works with hyperscript-helpers too:
const h = require("hyperscript");
const eh = require("emmet-hyperscript")(h);
const {div} = require("hyperscript-helpers")(eh);
div(
"#page > div#header > h1.classy",
"Example",
{style: {"background-color": "#22f"}}
);