2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-20 20:00:33 +03:00

feat(core): implement plugin api

This commit is contained in:
Nikolay Kostyurin
2018-07-30 22:52:48 +02:00
parent fdc05c0618
commit ee047e829b
5 changed files with 234 additions and 21 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
# bbob
# @bbob/core
## Usage
@@ -7,5 +7,7 @@ const bbob = require('@bbob/core');
const presetHTML5 = require('@bbob/preset-html5');
const code = `[i]Text[/i]`;
const processor = bbob([presetHTML5]).process(code, {sync: true}).html
const html = bbob([presetHTML5()]).process(code).html;
console.log(html); // <span style="font-style: italic;">Text</span>
```