@parcel/transformer-posthtml 2.0.0-nightly.842 → 2.0.0-nightly.843
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.
|
@@ -36,7 +36,7 @@ function _posthtml() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function _posthtmlParser() {
|
|
39
|
-
const data =
|
|
39
|
+
const data = require("posthtml-parser");
|
|
40
40
|
|
|
41
41
|
_posthtmlParser = function () {
|
|
42
42
|
return data;
|
|
@@ -46,7 +46,7 @@ function _posthtmlParser() {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function _posthtmlRender() {
|
|
49
|
-
const data =
|
|
49
|
+
const data = require("posthtml-render");
|
|
50
50
|
|
|
51
51
|
_posthtmlRender = function () {
|
|
52
52
|
return data;
|
|
@@ -156,7 +156,7 @@ var _default = new (_plugin().Transformer)({
|
|
|
156
156
|
return {
|
|
157
157
|
type: 'posthtml',
|
|
158
158
|
version: '0.4.1',
|
|
159
|
-
program: (0, _posthtmlParser().
|
|
159
|
+
program: (0, _posthtmlParser().parser)(await asset.getCode(), {
|
|
160
160
|
lowerCaseAttributeNames: true,
|
|
161
161
|
sourceLocations: true
|
|
162
162
|
})
|
|
@@ -202,7 +202,7 @@ var _default = new (_plugin().Transformer)({
|
|
|
202
202
|
ast
|
|
203
203
|
}) {
|
|
204
204
|
return {
|
|
205
|
-
content: (0, _posthtmlRender().
|
|
205
|
+
content: (0, _posthtmlRender().render)(ast.program)
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-posthtml",
|
|
3
|
-
"version": "2.0.0-nightly.
|
|
3
|
+
"version": "2.0.0-nightly.843+b6faa0c8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"parcel": "^2.0.0-beta.1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.0.0-nightly.
|
|
24
|
-
"@parcel/utils": "2.0.0-nightly.
|
|
23
|
+
"@parcel/plugin": "2.0.0-nightly.843+b6faa0c8",
|
|
24
|
+
"@parcel/utils": "2.0.0-nightly.843+b6faa0c8",
|
|
25
25
|
"nullthrows": "^1.1.1",
|
|
26
|
-
"posthtml": "^0.16.
|
|
27
|
-
"posthtml-parser": "^0.
|
|
28
|
-
"posthtml-render": "^
|
|
26
|
+
"posthtml": "^0.16.5",
|
|
27
|
+
"posthtml-parser": "^0.10.1",
|
|
28
|
+
"posthtml-render": "^3.0.0",
|
|
29
29
|
"semver": "^5.4.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b6faa0c819d562726ac8708f7f91ff0cb65b8311"
|
|
32
32
|
}
|
|
@@ -4,8 +4,8 @@ import {Transformer} from '@parcel/plugin';
|
|
|
4
4
|
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import posthtml from 'posthtml';
|
|
7
|
-
import parse from 'posthtml-parser';
|
|
8
|
-
import render from 'posthtml-render';
|
|
7
|
+
import {parser as parse} from 'posthtml-parser';
|
|
8
|
+
import {render} from 'posthtml-render';
|
|
9
9
|
import nullthrows from 'nullthrows';
|
|
10
10
|
import semver from 'semver';
|
|
11
11
|
import {relativePath} from '@parcel/utils';
|