🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@ampproject/bento-compiler

Package Overview
Dependencies
Maintainers
16
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ampproject/bento-compiler

Server-render amp components

latest
npmnpm
Version
0.0.14
Version published
Maintainers
16
Created
Source

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.

FAQs

Package last updated on 11 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts