-
Notifications
You must be signed in to change notification settings - Fork 0
/
rm.hbs
70 lines (52 loc) · 2.21 KB
/
rm.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[![view on npm](https://img.shields.io/npm/v/@uttori/plugin-renderer-replacer.svg)](https://www.npmjs.com/package/@uttori/plugin-renderer-replacer)
[![npm module downloads](https://img.shields.io/npm/dt/@uttori/plugin-renderer-replacer.svg)](https://www.npmjs.com/package/@uttori/plugin-renderer-replacer)
[![Build Status](https://travis-ci.com/uttori/uttori-plugin-renderer-replacer.svg?branch=master)](https://travis-ci.com/uttori/uttori-plugin-renderer-replacer)
[![Dependency Status](https://david-dm.org/uttori/uttori-plugin-renderer-replacer.svg)](https://david-dm.org/uttori/uttori-plugin-renderer-replacer)
[![Coverage Status](https://coveralls.io/repos/github/uttori/uttori-plugin-renderer-replacer/badge.svg?branch=master)](https://coveralls.io/github/uttori/uttori-plugin-renderer-replacer?branch=master)
[![Tree-Shaking Support](https://badgen.net/bundlephobia/tree-shaking/@uttori/plugin-renderer-replacer)](https://bundlephobia.com/result?p=@uttori/plugin-renderer-replacer)
[![Dependency Count](https://badgen.net/bundlephobia/dependency-count/@uttori/plugin-renderer-replacer)](https://bundlephobia.com/result?p=@uttori/plugin-renderer-replacer)
[![Minified + GZip](https://badgen.net/bundlephobia/minzip/@uttori/plugin-renderer-replacer)](https://bundlephobia.com/result?p=@uttori/plugin-renderer-replacer)
[![Minified](https://badgen.net/bundlephobia/min/@uttori/plugin-renderer-replacer)](https://bundlephobia.com/result?p=@uttori/plugin-renderer-replacer)
# Uttori Renderer - Replacer
Uttori plugin for replacing text in a rendering pipeline with Regular Expressions.
## Install
```bash
npm install --save @uttori/plugin-renderer-replacer
```
## Config
```javascript
{
// Registration Events
events: {
renderContent: [],
renderCollection: [],
validateConfig: [],
},
// Replace Rules
rules: [
{
test: 'shamrock',
output: '☘️',
},
{
test: /cow[-\s]?boy/gm,
output: '🤠',
},
]
}
```
* * *
## API Reference
{{>main}}
* * *
## Tests
To run the test suite, first install the dependencies, then run `npm test`:
```bash
npm install
npm test
DEBUG=Uttori* npm test
```
## Contributors
* [Matthew Callis](https://github.com/MatthewCallis)
## License
* [MIT](LICENSE)