Socket
Socket
Sign inDemoInstall

amp-to-html

Package Overview
Dependencies
519
Maintainers
1
Versions
508
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    amp-to-html

Create amp-story. with ease.


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Install size
47.0 MB
Created
Weekly downloads
 

Readme

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

Last updated on 30 Sep 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc