https://github.com/posthtml/posthtml-plugin-ts-boilerplate
Create new PostHTML plugins on TypeScript
https://github.com/posthtml/posthtml-plugin-ts-boilerplate
Last synced: 11 months ago
JSON representation
Create new PostHTML plugins on TypeScript
- Host: GitHub
- URL: https://github.com/posthtml/posthtml-plugin-ts-boilerplate
- Owner: posthtml
- License: mit
- Created: 2020-11-06T09:46:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T01:26:58.000Z (over 2 years ago)
- Last Synced: 2024-10-29T21:06:06.932Z (over 1 year ago)
- Language: TypeScript
- Size: 738 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: .github/contributing.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
# PLUGIN_NAME 
[![Actions Status][action]][action-url]
[![NPM][npm]][npm-url]
[![Coverage][cover]][cover-badge]
[![XO code style][style]][style-url]
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.
```bash
npm i PLUGIN_NAME
```
## 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 PLUGIN_NAME_CAMEL = require('PLUGIN_NAME');
posthtml()
.use(PLUGIN_NAME_CAMEL({ /* 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 PLUGIN_NAME_CAMEL = require('PLUGIN_NAME');
posthtml()
.use(PLUGIN_NAME_CAMEL({ 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).
[action]: https://github.com/USER_NAME/PLUGIN_NAME/workflows/Actions%20Status/badge.svg
[action-url]: https://github.com/USER_NAME/PLUGIN_NAME/actions?query=workflow%3A%22CI+tests%22
[npm]: https://img.shields.io/npm/v/PLUGIN_NAME.svg
[npm-url]: https://npmjs.com/package/PLUGIN_NAME
[style]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg
[style-url]: https://github.com/xojs/xo
[cover]: https://coveralls.io/repos/USER_NAME/PLUGIN_NAME/badge.svg?branch=master
[cover-badge]: https://coveralls.io/r/USER_NAME/PLUGIN_NAME?branch=master