https://github.com/posthtml/posthtml-stream
Stream Wrapper for PostHTML
https://github.com/posthtml/posthtml-stream
Last synced: 11 months ago
JSON representation
Stream Wrapper for PostHTML
- Host: GitHub
- URL: https://github.com/posthtml/posthtml-stream
- Owner: posthtml
- License: mit
- Created: 2016-08-12T09:17:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-04T15:10:42.000Z (over 9 years ago)
- Last Synced: 2024-10-29T21:06:07.876Z (over 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM][npm]][npm-url]
[![Deps][deps]][deps-url]
[![Tests][build]][build-url]
[![Coverage][cover]][cover-url]
[![Standard Code Style][style]][style-url]
[![Chat][chat]][chat-badge]
# PostHTML Stream 
## Install
```bash
npm i -S posthtml-stream
```
## Usage
### Options
**`chunks`**: `[Regex]` Chunk Matcher (Passthrough)
**`plugins`**: `[Array]` PostHTML Plugins
**`options`**: `[Object]` PostHTML Options
### Chunks
```html
PostHTML Stream
```
```js
createReadStream('index.html')
.pipe(split(''))
.pipe(posthtml(/head/, plugins, options))
.pipe(createWriteStream('result.html'))
```
```txt
--------------------> /head/ ---------------------->
src ---> split ---> posthtml(/head/, plugins, options) -------------> dest
```
## Maintainers
## Contributing
See [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [CONTRIBUTING](CONTRIBUTING.md).
## LICENSE
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/posthtml-stream.svg
[npm-url]: https://npmjs.com/package/posthtml-stream
[deps]: https://david-dm.org/posthtml/posthtml-stream.svg
[deps-url]: https://david-dm.org/posthtml/posthtml-stream
[build]: http://img.shields.io/travis/posthtml/posthtml-stream.svg
[build-url]: https://travis-ci.org/posthtml/posthtml-stream
[cover]: https://coveralls.io/repos/github/posthtml/posthtml-stream/badge.svg?branch=master
[cover-url]: https://coveralls.io/github/posthtml/posthtml-stream?branch=master
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
[style-url]: http://standardjs.com/
[chat]: https://badges.gitter.im/posthtml/posthtml.svg
[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"