This package has been deprecated

Author message:

Archived

emmet-hyperscript

1.0.0 • Public • Published

emmet-hyperscript

Travis CI build status Codacy grade

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"}}
);

Changelog

License

MIT

Package Sidebar

Install

npm i emmet-hyperscript

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • evgenyorekhov