Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amp-to-html

Package Overview
Dependencies
Maintainers
1
Versions
508
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-to-html

Create amp-story. with ease.

  • 4.9.37
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-37.5%
Maintainers
1
Weekly downloads
 
Created
Source

amp-to-html

Create amp-story. with ease.

#Install

npm install amp-to-html

Example

You can use local or cdn url to amp-story scripts

const Amp = require('amp-to-html')
const type = 'cdn' //'cdn' or 'local'
const data = require('./src/data') //test story data

const ampToHtmlConfig = new Amp(type, {
    v0Path: 'https://cdn.ampproject.org/v0.js',
    ampStoryPath: 'https://cdn.ampproject.org/v0/amp-story-1.0.js',
    ampVideoPath: 'https://cdn.ampproject.org/v0/amp-video-0.1.js',
    ampAnimationPath: null,
    fontPath: '',
    customFontPath: ''
  })

ampToHtmlConfig.createFullStory({ config, userAnalytics, customerAnalyticsKey, snippets, bookendLink }, (html) => { // 
  console.log(html)
})

FAQs

Package last updated on 30 Sep 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc