# postxml

> Xml transformations

Latest version **0.2.9** (published 2015-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install postxml
pnpm add postxml
yarn add postxml
bun add postxml
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.9 |
| Published | 2015-12-13 |
| First published | 2015-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | alanev |
| Maintainers | alanev |
| Keywords | html, transform |

## Links

- npm: https://www.npmjs.com/package/postxml
- Repository: https://github.com/postxml/postxml
- Issues: https://github.com/postxml/postxml/issues
- npm.io page: https://npm.io/package/postxml

## Dependencies (1)

- [cheerio](https://npm.io/package/cheerio.md) ^0.19.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.2.9 (latest) — 2015-12-13
- 0.2.7 — 2015-10-24
- 0.2.6 — 2015-10-22
- 0.2.5 — 2015-10-22
- 0.2.4 — 2015-09-22
- 0.2.3 — 2015-09-20
- 0.1.3 — 2015-09-02
- 0.1.1 — 2015-08-30
- 0.0.5 — 2015-08-29
- 0.0.4 — 2015-08-27
- 0.0.2 — 2015-08-25
- 0.0.1 — 2015-08-25

## README

# Postxml

It is a tool for transforming html/xml with JS plugins based on [cheerio](http://cheeriojs.github.io/cheerio/).

## Instalation

`npm i postxml --save-dev`

## Usage

### Nodejs
```js
var postxml = require('postxml');
var cheerioOptions = {};

var output = postxml([
      require('postxml-plugin')(pluginOptions)
   ])
   .process('<div class="b-block"></div>', cheerioOptions);
);
```

### Gulp
Use [`gulp-postxml`](https://github.com/postxml/gulp-postxml)
```js
var postxml = require('gulp-postxml');
var postxmlPlugins = [
      require('postxml-plugin')(pluginOptions)
   ];
var cheerioOptions = {};

gulp.task('html', function () {
   gulp.src('index.htm')
      .pipe(postxml(postxmlPlugins, cheerioOptions))
      .pipe(gulp.dest('out'));
})
```

## API

### Process(html, cheerioOptions)
Transform html with plugins

### Use(plugin)
Add plugin

## Boilerplate for new plugins
* [Plugin Boilerplate](https://github.com/postxml/postxml-plugin-boilerplate)

## Plugins
* [postxml-beml](https://github.com/postxml/postxml-beml) - [BEML](https://github.com/zenwalker/node-beml) plugin
* [postxml-custom-tags](https://github.com/postxml/postxml-custom-tags)
* [postxml-image-size](https://github.com/postxml/postxml-image-size) - adds sizes to images
* [postxml-imgalt](https://github.com/postxml/postxml-imgalt)
* [postxml-import](https://github.com/postxml/postxml-import)
* [postxml-import-styles](https://github.com/postxml/postxml-import-styles) - replace `<link>` with `<style>` and import css-code
* [postxml-markdown](https://github.com/postxml/postxml-markdown) - add classes (bem) to `markdown` html tags
* [postxml-ng-valid](https://github.com/postxml/postxml-ng-valid) - replace `ng-` with `data-ng`
* [postxml-placeholder](https://github.com/postxml/postxml-placeholder)
* [postxml-remove](https://github.com/postxml/postxml-remove) - removes elements by query selectors
* [postxml-repeat](https://github.com/postxml/postxml-remove) - repeat elements
* [postxml-wrap](https://github.com/postxml/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

## Examples of usage postxml in real projects
* http://projects.alanev.ru/wizard/wizard.dev.zip
* http://projects.alanev.ru/apc/apc.dev.zip

---
_Source: https://npm.io/package/postxml · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
