htm-chef
v1.1.0
Published
A tiny wrapper of htm and dom-chef for using JSX-like syntax to build DOM without transpile
Readme
htm-chef
A tiny wrapper of htm and dom-chef for using JSX-like syntax to build DOM without transpile
Installation
Using <script> tag with CDN: (This adding window.html)
<script src="https://unpkg.com/[email protected]"></script>Using ES6 modules:
<script type="module">
import html from 'https://unpkg.com/[email protected]?module'
</script>Using module bundlers: (You need setup a bundler and install htm-chef)
import html from 'htm-chef'Usage
Basic
With jsut JavaScript:
document.body.appendChild(html`<h1>Hello</h1>`)With jQuery:
$('body').append(html`<h1>Hello</h1>`)