Postxml
It is a tool for transforming html/xml with JS plugins based on cheerio.
Instalation
npm i postxml --save-dev
Usage
Nodejs
var postxml = ;var cheerioOptions = {}; var output = ;);
Gulp
Use gulp-postxml
var postxml = ;var postxmlPlugins = pluginOptions ;var cheerioOptions = {}; gulp
API
Process(html, cheerioOptions)
Transform html with plugins
Use(plugin)
Add plugin
Boilerplate for new plugins
Plugins
- postxml-beml - BEML plugin
- postxml-custom-tags
- postxml-image-size - adds sizes to images
- postxml-imgalt
- postxml-import
- postxml-import-styles - replace
<link>
with<style>
and import css-code - postxml-markdown - add classes (bem) to
markdown
html tags - postxml-ng-valid - replace
ng-
withdata-ng
- postxml-placeholder
- postxml-remove - removes elements by query selectors
- postxml-repeat - repeat elements
- postxml-wrap - wrap with emmet abbreviation
Ideas for plugins
- postxml-inline-data - replace images and files with data uri
- postxml-template - added template for postxml-repeat
- postxml-lazyload - shortcut syntax for lazyload
- postxml-prefix - add prefix to all classes
- postxml-size - shortcut width & height
- postxml-variables - html variables