@pi-r/posthtml 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +5 -4
- package/package.json +4 -4
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const util_1 = require("@e-mc/document/util");
|
|
3
|
+
async function transform(context, value, options) {
|
|
4
4
|
const external = options.external;
|
|
5
5
|
const baseConfig = options.toBaseConfig(false);
|
|
6
6
|
let plugins = baseConfig.plugins;
|
|
@@ -17,9 +17,10 @@ module.exports = async function transform(context, value, options) {
|
|
|
17
17
|
}
|
|
18
18
|
if (Array.isArray(plugins)) {
|
|
19
19
|
delete baseConfig.plugins;
|
|
20
|
-
const result = await context(
|
|
20
|
+
const result = await context((0, util_1.loadPlugins)(plugins)).process(value, baseConfig);
|
|
21
21
|
if (result) {
|
|
22
22
|
return result.html;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
|
+
module.exports = transform;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/posthtml",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "PostHTML transform function for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
|
-
"directory": "src/
|
|
12
|
+
"directory": "src/document/posthtml"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"squared",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/document": "^0.
|
|
23
|
+
"@e-mc/document": "^0.10.0",
|
|
24
24
|
"posthtml": "^0.16.6"
|
|
25
25
|
}
|
|
26
26
|
}
|