amp-to-html

4.9.37 • Public • Published

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)
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.9.37
    0
    • latest

Version History

Package Sidebar

Install

npm i amp-to-html

Weekly Downloads

0

Version

4.9.37

License

ISC

Unpacked Size

11 MB

Total Files

136

Last publish

Collaborators

  • stebneruslan