weboptimizer 2.0.1111 → 2.0.1115

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.1111",
3
+ "version": "2.0.1115",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -59,9 +59,9 @@
59
59
  },
60
60
  "scripts": {
61
61
  "build": "yarn build:types; yarn build:plain",
62
- "build:plain": "command=\"babel --extensions '.ts' --plugins @babel/plugin-proposal-class-properties,@babel/plugin-syntax-top-level-await,@babel/plugin-transform-runtime,babel-plugin-transform-modern-regexp --presets @babel/preset-env,@babel/preset-typescript --out-file\" && $command browser.js browser.ts && $command configurator.js configurator.ts && $command ejsLoader.js ejsLoader.ts && $command helper.js helper.ts && $command index.js index.ts && $command jestEnvironmentBrowser.js jestEnvironmentBrowser.ts && $command stylelintConfigurator.js stylelintConfigurator.ts && $command type.js type.ts && $command webpackConfigurator.js webpackConfigurator.ts && chmod +x index.js && sed --in-place --regexp-extended 's:(#!/usr/bin/env )babel-(node):\\1\\2:' index.js",
63
- "build:test": "yarn clear && yarn build:plain && command='babel --extensions '.ts' --plugins @babel/plugin-proposal-class-properties,@babel/plugin-syntax-top-level-await,@babel/plugin-transform-runtime --presets @babel/preset-env,@babel/preset-typescript --source-root ../ --out-file' && pushd test/simple && yarn; popd && pushd test/scss && yarn; popd && rimraf node_modules/weboptimizer test/simple/node_modules/weboptimizer test/scss/node_modules/weboptimizer && mkdir --parents node_modules/weboptimizer test/simple/node_modules/weboptimizer test/scss/node_modules/weboptimizer && copyCommand='cp *.ts *.js *.json *.ejs' && $copyCommand node_modules/weboptimizer/ && $copyCommand test/simple/node_modules/weboptimizer/ && $copyCommand test/scss/node_modules/weboptimizer/ && $command test/browser.js test/browser.ts && $command test/configurator.js test/configurator.ts && $command test/helper.js test/helper.ts && $command test/ejsLoader.js test/ejsLoader.ts && $command test/stylelintConfigurator.js test/stylelintConfigurator.ts && $command test/index.js test/index.ts && $command test/webpackConfigurator.js test/webpackConfigurator.ts",
64
- "build:test:source-map": "yarn clear && yarn build:plain && command='babel --extensions '.ts' --plugins @babel/plugin-proposal-class-properties,@babel/plugin-syntax-top-level-await,@babel/plugin-transform-runtime --presets @babel/preset-env,@babel/preset-typescript --source-maps inline --source-root ../ --out-file' && rimraf node_modules/weboptimizer && mkdir node_modules/weboptimizer && cp *.ts *.js *.json *.ejs node_modules/weboptimizer/ && $command test/browser.js test/browser.ts && $command test/configurator.js test/configurator.ts && $command test/helper.js test/helper.ts && $command test/ejsLoader.js test/ejsLoader.ts && $command test/stylelintConfigurator.js test/stylelintConfigurator.ts && $command test/index.js test/index.ts && $command test/webpackConfigurator.js test/webpackConfigurator.ts",
62
+ "build:plain": "command=\"babel --extensions '.ts' --plugins @babel/plugin-proposal-class-properties,@babel/plugin-syntax-top-level-await,@babel/plugin-transform-runtime,babel-plugin-transform-modern-regexp --presets @babel/preset-env,@babel/preset-typescript --out-file\" && $command browser.js browser.ts && $command configurator.js configurator.ts && $command ejsLoader.js ejsLoader.ts && $command helper.js helper.ts && $command index.js index.ts && $command jestEnvironmentBrowser.js jestEnvironmentBrowser.ts && $command stylelintConfigurator.js stylelintConfigurator.ts && $command type.js type.ts && $command webpackConfigurator.js webpackConfigurator.ts && shx chmod +x index.js && shx sed -i 's/(#!\\\\/usr\\\\/bin\\\\/env )babel-(node)/$1$2/' index.js 1>/dev/null",
63
+ "build:test": "yarn clear && yarn build:plain && command='babel --extensions '.ts' --plugins @babel/plugin-proposal-class-properties,@babel/plugin-syntax-top-level-await,@babel/plugin-transform-runtime --presets @babel/preset-env,@babel/preset-typescript --source-root ../ --out-file' && cd test/simple && yarn; cd ../../ && cd test/scss && yarn; cd ../../ && rimraf node_modules/weboptimizer test/simple/node_modules/weboptimizer test/scss/node_modules/weboptimizer && shx mkdir -p node_modules/weboptimizer test/simple/node_modules/weboptimizer test/scss/node_modules/weboptimizer && copyCommand='shx cp *.ts *.js *.json *.ejs' && $copyCommand node_modules/weboptimizer/ && $copyCommand test/simple/node_modules/weboptimizer/ && $copyCommand test/scss/node_modules/weboptimizer/ && $command test/browser.js test/browser.ts && $command test/configurator.js test/configurator.ts && $command test/helper.js test/helper.ts && $command test/ejsLoader.js test/ejsLoader.ts && $command test/stylelintConfigurator.js test/stylelintConfigurator.ts && $command test/index.js test/index.ts && $command test/webpackConfigurator.js test/webpackConfigurator.ts",
64
+ "build:test:source-map": "yarn clear && yarn build:plain && command='babel --extensions '.ts' --plugins @babel/plugin-proposal-class-properties,@babel/plugin-syntax-top-level-await,@babel/plugin-transform-runtime --presets @babel/preset-env,@babel/preset-typescript --source-maps inline --source-root ../ --out-file' && rimraf node_modules/weboptimizer && shx mkdir -p node_modules/weboptimizer && shx cp *.ts *.js *.json *.ejs node_modules/weboptimizer/ && $command test/browser.js test/browser.ts && $command test/configurator.js test/configurator.ts && $command test/helper.js test/helper.ts && $command test/ejsLoader.js test/ejsLoader.ts && $command test/stylelintConfigurator.js test/stylelintConfigurator.ts && $command test/index.js test/index.ts && $command test/webpackConfigurator.js test/webpackConfigurator.ts",
65
65
  "build:types": "tsc --emitDeclarationOnly",
66
66
  "check": "yarn check:types; yarn lint",
67
67
  "check:types": "tsc --noEmit",
@@ -148,7 +148,7 @@
148
148
  "postcss-preset-env": "*",
149
149
  "postcss-sprites": "*",
150
150
  "postcss-url": "*",
151
- "shelljs": "*",
151
+ "shx": "*",
152
152
  "style-loader": "*",
153
153
  "stylelint": "*",
154
154
  "stylelint-config-standard": "*",
@@ -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,11 +304,12 @@
303
304
  }
304
305
  },
305
306
  "engines": {
306
- "node": ">=16",
307
+ "node": ">=17",
307
308
  "npm": ">=7"
308
309
  },
309
310
  "resolutions": {
310
- "@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz"
311
+ "@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz",
312
+ "colors": "1.4.0"
311
313
  },
312
314
  "sideEffects": true,
313
315
  "documentationWebsite": {