🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

postxml-amp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postxml-amp

PostXML plugin to convert plain HTML to Google Accelerated Mobile Pages (AMP)

0.4.2
latest
Source
npm
Version published
Weekly downloads
11
Maintainers
1
Weekly downloads
 
Created
Source

postxml-amp

npm version Downloads Stats

Build Status tested with jest Known Vulnerabilities Greenkeeper badge

PostXML plugin to convert plain HTML to Google Accelerated Mobile Pages (AMP).

Installation

npm install postxml-amp --save

Usage

Postxml

Options

cwd

Assets (images/styles) file path

  • Type: String
  • Default: ''

round

Enable images dimensions rounding

  • Type: String
  • Default: true

Example

Input

<html>
  <head>
    <link rel="stylesheet" href="style.css">
  </head>
  <img src="image.png">
</html>

image.png

image.png

style.css

body {
  background-color: #fff;
}

Output

<html amp="">
  <head>
    <style amp-custom="">body{background-color:#fff}</style>
  </head>
  <amp-img src="image.png" width="600" height="400"></amp-img>
</html>

Release History

HISTORY

Licence

MIT (c) Ruslan Kazakov

Keywords

html

FAQs

Package last updated on 21 Jun 2018

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