Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,2 @@ | ||
const cheerio = require('cheerio') | ||
@@ -14,2 +15,3 @@ const amp = require('./lib/amp') | ||
const link = require('./lib/link') | ||
const toolbox = require('./lib/toolbox') | ||
@@ -30,5 +32,6 @@ const html2amp = async (html, options = {}) => { | ||
$ = boilerplate($, options) | ||
return $.html() | ||
html = await toolbox.optimizer($.html(), options) | ||
return html | ||
} | ||
module.exports = html2amp |
{ | ||
"name": "html2amp", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Simple converter from HTML into AMP(Accelerated Mobile Pages)", | ||
@@ -28,2 +28,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@ampproject/toolbox-optimizer": "^1.1.2-alpha.0", | ||
"axios": "^0.19.0", | ||
@@ -30,0 +31,0 @@ "cheerio": "^1.0.0-rc.2", |
@@ -52,4 +52,4 @@ | ||
serviceWorker| |attributes of [amp-install-serviceworker](https://www.ampproject.org/docs/reference/components/amp-install-serviceworker) <br/> e.g. `src`, `data-iframe-src` | ||
optimize|false| if true, this module will optimize the html by using [@ampproject/toolbox-optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) | ||
## Functions | ||
@@ -80,2 +80,3 @@ | ||
- e.g. `<a href="/test">` is replaced with `<a href="https//original-url.com/test">` | ||
- optimize html by using [@ampproject/toolbox-optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) | ||
@@ -82,0 +83,0 @@ ## Preparation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15321
20
275
88
6
+ Added@ampproject/toolbox-core@1.1.1(transitive)
+ Added@ampproject/toolbox-optimizer@1.1.2(transitive)
+ Added@ampproject/toolbox-runtime-version@1.1.1(transitive)
+ Added@ampproject/toolbox-script-csp@1.1.1(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedcss@2.2.4(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addednode-fetch@2.6.0(transitive)
+ Addedparse5@5.1.0(transitive)
+ Addedparse5-htmlparser2-tree-adapter@5.1.0(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedurix@0.1.0(transitive)