ampit

2.1.1 • Public • Published

AMP-It

AMP-It is a node module that automates the process of converting a HTML file into an AMP complient file.

const ampIT = require('../dist/main');
var content = '<html></html>' //HTML File

let ampHTML = ampIT(content);

console.log(newhtml);
//Returns AMP Complient HTML

AMPIT(String); The Following Example will return AMP Complient HTML.

Installation

npm install Amp-It

Information

AMP-It first runs your provided HTML into the AMP Validator Module. It then gathers all AMP errors into an array. AMP-It then goes through the errors and corrects them according to the type of error. Once the corrections are made, AMP-It runs the corrected code into the AMP Validator just to double check. As of now AMP-IT returns the HTML as a string. (Soon to return an AMP HTML file)
See https://www.ampproject.org/docs/reference/spec for AMP Specifications

Testing

No Testing Yet

Dependencies

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i ampit

Weekly Downloads

0

Version

2.1.1

License

ISC

Last publish

Collaborators

  • mmadden1495