An open API service indexing awesome lists of open source software.

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

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