Neutral Point Measurement
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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

Keywords

none

install

npm i ampit

Downloadsweekly downloads

4

version

2.1.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar