@ampproject/bento-compiler
TypeScript icon, indicating that this package has built-in type declarations

0.0.14 • Public • Published

Bento Compiler

Server-render AMP Components with worker-dom.

Install

$ npm install --save @ampproject/bento-compiler

Usage

Visit the test cases for more info.

import {renderAst} from '@ampproject/bento-compiler';

function ampLayoutBuildDom(element) {
  element.setAttribute('i-amphtml-ssr', '');
}

const ast = h('html', {}, [h('body', {}, [h('amp-layout'))])]);
const rendered = renderAst(ast, {'amp-layout': ampLayoutBuildDom});

Analysis

See the analysis for details on how we measured expected performance improvement.

Readme

Keywords

none

Package Sidebar

Install

npm i @ampproject/bento-compiler

Weekly Downloads

222

Version

0.0.14

License

Apache-2.0

Unpacked Size

125 kB

Total Files

18

Last publish

Collaborators

  • ampproject-admin
  • kristoferbaxter
  • jridgewell
  • choumx
  • amp-toolbox
  • fstanis
  • erwinmombay
  • samouri
  • caroqliu
  • rsimha
  • dvoytenko
  • patrickkettner
  • alanorozco
  • kdwan
  • ampprojectbot
  • esth