<commit_before># ampify
[![NPM Version][npm-image]][npm-url]
[![Downloads Stats][npm-downloads]][npm-url]

> Convert plain HTML to Google Accelerated Mobile Pages (AMP).

## Installation
```sh
npm install ampify --save-dev
```

## Usage

```js
const ampify = require('ampify');
const html = 'YOUR_HTML_CONTENT';
const amp = ampify(html, {cwd: 'amp'});

console.log(amp) // Content of AMP HTML
```

## Options
### cwd
**Assets (images/styles) file path**
Type: `String`
Default: `''`

### round
**Enable images dimensions rounding**
Type: `String`
Default: `true`

## Example

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

###### image.png
[image.png](/test/image.png)

###### style.css
```css
body {
  background-color: #fff;
}
```

### Output
```html
<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

* 0.2.6
	* UPDATE: unit tests
* 0.2.5
	* UPDATE: head tag charset order
	* UPDATE: remove invalid img tag
	* UPDATE: unit tests
	* UPDATE: readme documentation
	* UPDATE: package.json
* 0.2.4
  * UPDATE: package.json
* 0.2.3
	* ADD: meta tag viewport
	* ADD: style amp-boilerplate
* 0.2.2
	* ADD: meta tag charset
	* ADD: AMP library script tag
	* BUG: Options parameter not passing
* 0.2.1
	* ADD: inline styles
	* ADD: amp-img tag
	* ADD: amp-video tag
	* ADD: unit tests
* 0.1.0
	* ADD: AMP HTML tag
	* Work in progress

## Licence
MIT (c) <NAME>

[PostXML]: https://github.com/postxml/postxml
[npm-url]: https://www.npmjs.org/package/ampify
[npm-image]: https://img.shields.io/npm/v/ampify.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/ampify.svg?style=flat-square<commit_msg>Update readme - Snyk badge and contributors link<commit_after># ampify
[![NPM Version][npm-image]][npm-url]
[![Downloads Stats][npm-downloads]][npm-url]
[![Known Vulnerabilities](https://snyk.io/test/github/rkazakov/ampify/badge.svg)](https://snyk.io/test/github/rkazakov/ampify)

> Convert plain HTML to Google Accelerated Mobile Pages (AMP).

## Installation
```sh
npm install ampify --save-dev
```

## Usage

```js
const ampify = require('ampify');
const html = 'YOUR_HTML_CONTENT';
const amp = ampify(html, {cwd: 'amp'});

console.log(amp) // Content of AMP HTML
```

## Options
### cwd
**Assets (images/styles) file path**
Type: `String`
Default: `''`

### round
**Enable images dimensions rounding**
Type: `String`
Default: `true`

## Example

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

###### image.png
[image.png](/test/image.png)

###### style.css
```css
body {
  background-color: #fff;
}
```

### Output
```html
<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

* 0.2.6
	* UPDATE: unit tests
* 0.2.5
	* UPDATE: head tag charset order
	* UPDATE: remove invalid img tag
	* UPDATE: unit tests
	* UPDATE: readme documentation
	* UPDATE: package.json
* 0.2.4
  * UPDATE: package.json
* 0.2.3
	* ADD: meta tag viewport
	* ADD: style amp-boilerplate
* 0.2.2
	* ADD: meta tag charset
	* ADD: AMP library script tag
	* BUG: Options parameter not passing
* 0.2.1
	* ADD: inline styles
	* ADD: amp-img tag
	* ADD: amp-video tag
	* ADD: unit tests
* 0.1.0
	* ADD: AMP HTML tag
	* Work in progress

## Licence
MIT (c) <NAME> and [contributors](https://github.com/rkazakov/ampify/graphs/contributors)

[PostXML]: https://github.com/postxml/postxml
[npm-url]: https://www.npmjs.org/package/ampify
[npm-image]: https://img.shields.io/npm/v/ampify.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/ampify.svg?style=flat-square
{'fraction_non_alphanumeric': 0.19188001034393587, 'fraction_numerical': 0.013964313421256789, 'mean_word_length': 4.227027027027027, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3240641', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1438, 'n_words': 355}