https://github.com/posthtml/posthtml-component
component PostHTML plugin
https://github.com/posthtml/posthtml-component
Last synced: 11 months ago
JSON representation
component PostHTML plugin
- Host: GitHub
- URL: https://github.com/posthtml/posthtml-component
- Owner: posthtml
- License: mit
- Created: 2019-10-01T07:27:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-03T07:56:06.000Z (over 6 years ago)
- Last Synced: 2024-10-29T21:06:04.518Z (over 1 year ago)
- Language: JavaScript
- Size: 76.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: license
Awesome Lists containing this project
README
# PostHTML Plugin Boilerplate 
[![NPM][npm]][npm-url]
[![Deps][deps]][deps-url]
[![Build][build]][build-badge]
[![Coverage][cover]][cover-badge]
[![Standard Code Style][style]][style-url]
[![Chat][chat]][chat-badge]
Clone this repo and explain what your plugin do and why thousands of people need it ;)
Before:
``` html
OMG
```
After:
``` html
OMG
```
## Install
Describe how big guys can install your plugin.
> npm i posthtml posthtml-plugin
## Usage
Describe how people can use this plugin. Include info about build systems if it's
necessary.
``` js
const fs = require('fs');
const posthtml = require('posthtml');
const posthtmlPlugin = require('posthtml-plugin');
posthtml()
.use(posthtmlPlugin({ /* options */ }))
.process(html/*, options */)
.then(result => fs.writeFileSync('./after.html', result.html));
```
## Options
Describe all features of your plugin with examples of usage.
### Feature
Before:
``` html
OMG
```
Add option:
``` js
const fs = require('fs');
const posthtml = require('posthtml');
const posthtmlPlugin = require('posthtml-plugin');
posthtml()
.use(posthtmlPlugin({ feature: 'wow' }))
.process(html/*, options */)
.then(result => fs.writeFileSync('./after.html', result.html));
```
After:
``` html
OMG
```
### Contributing
See [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).
### License [MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/posthtml.svg
[npm-url]: https://npmjs.com/package/posthtml
[deps]: https://david-dm.org/posthtml/posthtml.svg
[deps-url]: https://david-dm.org/posthtml/posthtml
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
[style-url]: http://standardjs.com/
[build]: https://travis-ci.org/posthtml/posthtml.svg?branch=master
[build-badge]: https://travis-ci.org/posthtml/posthtml?branch=master
[cover]: https://coveralls.io/repos/posthtml/posthtml/badge.svg?branch=master
[cover-badge]: https://coveralls.io/r/posthtml/posthtml?branch=master
[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"