@decentra/html-markup
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

html-markup

Package to render markup based on Javascript template literals. It to some extent based on/inspired by work of Jason Miller at https://github.com/developit/htm

This is VERY simplistic implementation based on tagged templates.

The purpose is just perform the kind of SSR (server-side-rendering).

Usage:

import html from "@decentra/html-markup";

export function renderSomeHtml(values) {
    return html`<div class="${values.className}`>
        {values.items.map(item => html`<div>${item.message}</div>`)}
    </div>`;
}

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i @decentra/html-markup

    Weekly Downloads

    0

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    10.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • kote.isaev