@robinblomberg/html-ast
v0.6.10
Published
A library for creating abstract syntax trees for HTML.
Downloads
514
Readme
HTML AST
A library for creating abstract syntax trees for HTML.
Installation
npm install @robinblomberg/html-astUsage
import { c } from '@robinblomberg/html-ast';
const ast = h.document([
h.doctype(),
h.html([
h.head([
h.meta({ charset: 'utf-8' }),
h.title('Hello world!'),
h.link({ rel: 'stylesheet', href: 'style.css' }),
]),
h.body([
h.h1('Hello world!'),
h.p('Lorem ipsum dolor sit amet, consectetur adipiscing elit.'),
]),
]),
]);