@parcel/transformer-posthtml 2.8.2 → 2.8.4-nightly.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/lib/PostHTMLTransformer.js +1 -17
- package/package.json +5 -5
- package/src/PostHTMLTransformer.js +2 -12
|
@@ -75,16 +75,6 @@ function _semver() {
|
|
|
75
75
|
return data;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
function _utils() {
|
|
79
|
-
const data = require("@parcel/utils");
|
|
80
|
-
|
|
81
|
-
_utils = function () {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
78
|
var _loadPlugins = _interopRequireDefault(require("./loadPlugins"));
|
|
89
79
|
|
|
90
80
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -99,7 +89,7 @@ var _default = new (_plugin().Transformer)({
|
|
|
99
89
|
return;
|
|
100
90
|
}
|
|
101
91
|
|
|
102
|
-
let configFile = await config.getConfig(['.posthtmlrc', '.posthtmlrc.js', '.posthtmlrc.cjs', 'posthtml.config.js', 'posthtml.config.cjs'], {
|
|
92
|
+
let configFile = await config.getConfig(['.posthtmlrc', '.posthtmlrc.js', '.posthtmlrc.cjs', '.posthtmlrc.mjs', 'posthtml.config.js', 'posthtml.config.cjs', 'posthtml.config.mjs'], {
|
|
103
93
|
packageKey: 'posthtml'
|
|
104
94
|
});
|
|
105
95
|
|
|
@@ -112,12 +102,6 @@ var _default = new (_plugin().Transformer)({
|
|
|
112
102
|
logger.warn({
|
|
113
103
|
message: 'WARNING: Using a JavaScript PostHTML config file means losing out on caching features of Parcel. Use a .posthtmlrc (JSON) file whenever possible.'
|
|
114
104
|
});
|
|
115
|
-
config.invalidateOnStartup(); // Also add the config as a dev dependency so we attempt to reload in watch mode.
|
|
116
|
-
|
|
117
|
-
config.addDevDependency({
|
|
118
|
-
specifier: (0, _utils().relativePath)(_path().default.dirname(config.searchPath), configFile.filePath),
|
|
119
|
-
resolveFrom: config.searchPath
|
|
120
|
-
});
|
|
121
105
|
} // Load plugins. This must be done before adding dev dependencies so we auto install.
|
|
122
106
|
|
|
123
107
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-posthtml",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.4-nightly.0+7b79c6d",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"source": "src/PostHTMLTransformer.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "
|
|
20
|
+
"parcel": "2.8.4-nightly.0+7b79c6d"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.8.
|
|
24
|
-
"@parcel/utils": "2.8.
|
|
23
|
+
"@parcel/plugin": "2.8.4-nightly.0+7b79c6d",
|
|
24
|
+
"@parcel/utils": "2.8.4-nightly.0+7b79c6d",
|
|
25
25
|
"nullthrows": "^1.1.1",
|
|
26
26
|
"posthtml": "^0.16.5",
|
|
27
27
|
"posthtml-parser": "^0.10.1",
|
|
28
28
|
"posthtml-render": "^3.0.0",
|
|
29
29
|
"semver": "^5.7.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "7b79c6d69ffabef89810a8db61e9abdeb70d6990"
|
|
32
32
|
}
|
|
@@ -8,7 +8,6 @@ import {parser as parse} from 'posthtml-parser';
|
|
|
8
8
|
import {render} from 'posthtml-render';
|
|
9
9
|
import nullthrows from 'nullthrows';
|
|
10
10
|
import semver from 'semver';
|
|
11
|
-
import {relativePath} from '@parcel/utils';
|
|
12
11
|
import loadPlugins from './loadPlugins';
|
|
13
12
|
|
|
14
13
|
export default (new Transformer({
|
|
@@ -22,8 +21,10 @@ export default (new Transformer({
|
|
|
22
21
|
'.posthtmlrc',
|
|
23
22
|
'.posthtmlrc.js',
|
|
24
23
|
'.posthtmlrc.cjs',
|
|
24
|
+
'.posthtmlrc.mjs',
|
|
25
25
|
'posthtml.config.js',
|
|
26
26
|
'posthtml.config.cjs',
|
|
27
|
+
'posthtml.config.mjs',
|
|
27
28
|
],
|
|
28
29
|
{
|
|
29
30
|
packageKey: 'posthtml',
|
|
@@ -39,17 +40,6 @@ export default (new Transformer({
|
|
|
39
40
|
message:
|
|
40
41
|
'WARNING: Using a JavaScript PostHTML config file means losing out on caching features of Parcel. Use a .posthtmlrc (JSON) file whenever possible.',
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
-
config.invalidateOnStartup();
|
|
44
|
-
|
|
45
|
-
// Also add the config as a dev dependency so we attempt to reload in watch mode.
|
|
46
|
-
config.addDevDependency({
|
|
47
|
-
specifier: relativePath(
|
|
48
|
-
path.dirname(config.searchPath),
|
|
49
|
-
configFile.filePath,
|
|
50
|
-
),
|
|
51
|
-
resolveFrom: config.searchPath,
|
|
52
|
-
});
|
|
53
43
|
}
|
|
54
44
|
|
|
55
45
|
// Load plugins. This must be done before adding dev dependencies so we auto install.
|