weboptimizer 2.0.1112 → 2.0.1113

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/ejsLoader.d.ts CHANGED
@@ -32,4 +32,5 @@ export declare type LoaderConfiguration = Mapping<unknown> & {
32
32
  *
33
33
  * @returns Transformed string.
34
34
  */
35
- export default function (this: LoaderContext<LoaderConfiguration>, source: string): string;
35
+ export declare const loader: (this: LoaderContext<LoaderConfiguration>, source: string) => string;
36
+ export default loader;
package/ejsLoader.js CHANGED
@@ -22,7 +22,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
22
22
  Object.defineProperty(exports, "__esModule", {
23
23
  value: true
24
24
  });
25
- exports["default"] = _default;
25
+ exports.loader = exports["default"] = void 0;
26
26
 
27
27
  var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct"));
28
28
 
@@ -62,8 +62,9 @@ var configuration = (0, _configurator["default"])();
62
62
  * @returns Transformed string.
63
63
  */
64
64
 
65
- function _default(source) {
66
- var _this = this;
65
+ var loader = function loader(source) {
66
+ var _ref,
67
+ _this = this;
67
68
 
68
69
  var givenOptions = _clientnode["default"].convertSubstringInPlainObject(_clientnode["default"].extend(true, {
69
70
  compiler: {},
@@ -84,7 +85,7 @@ function _default(source) {
84
85
  aliases: {},
85
86
  replacements: {}
86
87
  }
87
- }, 'getOptions' in this ? this.getOptions() || {} : {}), /#%%%#/g, '!');
88
+ }, 'getOptions' in this && this.getOptions() ? this.getOptions() : (_ref = this.query) !== null && _ref !== void 0 ? _ref : {}), /#%%%#/g, '!');
88
89
 
89
90
  var compile = function compile(template) {
90
91
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : givenOptions.compiler;
@@ -143,7 +144,9 @@ function _default(source) {
143
144
  };
144
145
 
145
146
  var compressHTML = function compressHTML(content) {
146
- return givenOptions.compress.html ? (0, _htmlMinifier.minify)(content, _clientnode["default"].extend(true, {
147
+ var _givenOptions$compres;
148
+
149
+ return (_givenOptions$compres = givenOptions.compress) !== null && _givenOptions$compres !== void 0 && _givenOptions$compres.html ? (0, _htmlMinifier.minify)(content, _clientnode["default"].extend(true, {
147
150
  caseSensitive: true,
148
151
  collapseInlineTagWhitespace: true,
149
152
  collapseWhitespace: true,
@@ -165,7 +168,7 @@ function _default(source) {
165
168
  */
166
169
  trimCustomFragments: true,
167
170
  useShortDoctype: true
168
- }, givenOptions.compress.html)) : content;
171
+ }, givenOptions.compress.html || {})) : content;
169
172
  };
170
173
 
171
174
  var result = template;
@@ -268,7 +271,12 @@ function _default(source) {
268
271
  isString: true,
269
272
  localsName: 'scope'
270
273
  }), givenOptions.compileSteps)(givenOptions.locals || {});
271
- } // region vim modline
274
+ };
275
+
276
+ exports.loader = loader;
277
+ var _default = loader; // region vim modline
272
278
  // vim: set tabstop=4 shiftwidth=4 expandtab:
273
279
  // vim: foldmethod=marker foldmarker=region,endregion:
274
280
  // endregion
281
+
282
+ exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "2.0.1112",
3
+ "version": "2.0.1113",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -182,6 +182,7 @@
182
182
  "jest": "*",
183
183
  "jsdoc": "*",
184
184
  "mini-css-extract-plugin": "*",
185
+ "postcss": "*",
185
186
  "postcss-fontpath": "*",
186
187
  "postcss-import": "*",
187
188
  "postcss-loader": "*",
@@ -303,7 +304,7 @@
303
304
  }
304
305
  },
305
306
  "engines": {
306
- "node": ">=16",
307
+ "node": ">=17",
307
308
  "npm": ">=7"
308
309
  },
309
310
  "resolutions": {