+3
-7
| var cheerio = require('cheerio'); | ||
| var set = function (variable, alt) { | ||
| return (variable != undefined) ? variable : alt; | ||
| }; | ||
| var POSTXML = function () { | ||
@@ -19,5 +15,5 @@ | ||
| var options = {}, $; | ||
| options.normalizeWhitespace = set(options.normalizeWhitespace, true); | ||
| options.xmlMode = set(options.xmlMode, false); | ||
| options.decodeEntities = set(options.decodeEntities, false); | ||
| options.normalizeWhitespace = options.normalizeWhitespace || true; | ||
| options.xmlMode = options.xmlMode || false; | ||
| options.decodeEntities = options.decodeEntities || false; | ||
@@ -24,0 +20,0 @@ // transform with plugins |
+1
-1
| { | ||
| "name": "postxml", | ||
| "version": "0.2.4", | ||
| "version": "0.2.5", | ||
| "description": "Xml transformations", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+9
-3
@@ -30,3 +30,3 @@ # Postxml | ||
| var postxmlPlugins = [ | ||
| require('postxml-plugin') | ||
| require('postxml-plugin')(options) | ||
| ]; | ||
@@ -44,3 +44,3 @@ var cheerioOptions = {}; | ||
| ### Procces(html, cheerioOptions) | ||
| ### Process(html, cheerioOptions) | ||
| Transform html with plugins | ||
@@ -65,2 +65,4 @@ | ||
| * [postxml-import-styles](https://github.com/postxml/postxml-import-styles) - replace `<link>` with `<style>` and import css-code | ||
| * [postxml-import-styles](https://github.com/postxml/postxml-image-size) - adds sizes to images | ||
| * [postxml-import-styles](https://github.com/postxml/postxml-remove) - removes elements by query selectors | ||
@@ -70,2 +72,6 @@ | ||
| * **postxml-inline-data** - replace images and files with data uri | ||
| * **postxml-image-size** - add sizes to images | ||
| * **postxml-template** - added template for postxml-repeat | ||
| * **postxml-lazyload** - syntax for lazyload | ||
| * **postxml-lodash-template** - anable lodash templates | ||
| * **postxml-prefix** - add prefix to all classes | ||
| * **postxml-size** - shortcut width & height |
4585
7.48%73
8.96%44
-6.38%