weboptimizer 2.0.1370 → 2.0.1372

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/declarations.d.ts CHANGED
@@ -42,10 +42,11 @@ declare module 'postcss-sprites' {
42
42
  verbose:boolean
43
43
  }>):PostcssTransformer
44
44
  }
45
- declare module 'webOptimizerDefaultTemplateFilePath'
45
+ declare module 'rimraf'
46
46
  declare module 'svgo' {
47
47
  export type Options = any
48
48
  }
49
+ declare module 'webOptimizerDefaultTemplateFilePath'
49
50
  declare module '*.module' {
50
51
  const classes:Mapping
51
52
  export default classes
package/index.js CHANGED
@@ -34,7 +34,7 @@ var _fs = require("fs");
34
34
  var _promises = require("fs/promises");
35
35
  var _globAll = require("glob-all");
36
36
  var _path = _interopRequireWildcard(require("path"));
37
- var _esm = require("rimraf/dist/esm");
37
+ var _rimraf = require("rimraf");
38
38
  var _configurator = require("./configurator");
39
39
  var _helper = _interopRequireDefault(require("./helper"));
40
40
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -43,8 +43,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
43
43
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
44
44
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
45
45
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
46
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // TODO Workaround for https://github.com/isaacs/rimraf/issues/290
47
- // When fixed just use 'rimraf'
46
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
48
47
  // endregion
49
48
  // NOTE: Environment variables can only be strings.
50
49
  process.env.UV_THREADPOOL_SIZE = '128';
@@ -178,7 +177,7 @@ var main = function main(context) {
178
177
  break;
179
178
  }
180
179
  _context.next = 9;
181
- return (0, _esm.rimraf)(file.path);
180
+ return (0, _rimraf.rimraf)(file.path);
182
181
  case 9:
183
182
  return _context.abrupt("return", false);
184
183
  case 10:
@@ -241,7 +240,7 @@ var main = function main(context) {
241
240
  break;
242
241
  case 56:
243
242
  _context3.next = 58;
244
- return (0, _esm.rimraf)(configuration.path.target.base);
243
+ return (0, _rimraf.rimraf)(configuration.path.target.base);
245
244
  case 58:
246
245
  _context3.next = 60;
247
246
  return _clientnode["default"].isDirectory(configuration.path.apiDocumentation);
@@ -251,7 +250,7 @@ var main = function main(context) {
251
250
  break;
252
251
  }
253
252
  _context3.next = 63;
254
- return (0, _esm.rimraf)(configuration.path.apiDocumentation);
253
+ return (0, _rimraf.rimraf)(configuration.path.apiDocumentation);
255
254
  case 63:
256
255
  _iterator2 = _createForOfIteratorHelper(configuration.path.tidyUpOnClear);
257
256
  try {
@@ -259,14 +258,14 @@ var main = function main(context) {
259
258
  _filePath = _step2.value;
260
259
  if (_filePath) if (_clientnode["default"].isFileSync(_filePath))
261
260
  // NOTE: Close handler have to be synchronous.
262
- (0, _fs.unlinkSync)(_filePath);else if (_clientnode["default"].isDirectorySync(_filePath)) (0, _esm.sync)(_filePath);
261
+ (0, _fs.unlinkSync)(_filePath);else if (_clientnode["default"].isDirectorySync(_filePath)) (0, _rimraf.sync)(_filePath);
263
262
  }
264
263
  } catch (err) {
265
264
  _iterator2.e(err);
266
265
  } finally {
267
266
  _iterator2.f();
268
267
  }
269
- (0, _esm.sync)((0, _globAll.sync)(configuration.path.tidyUpOnClearGlobs));
268
+ (0, _rimraf.sync)((0, _globAll.sync)(configuration.path.tidyUpOnClearGlobs));
270
269
  case 66:
271
270
  // endregion
272
271
  // region handle build
@@ -325,14 +324,14 @@ var main = function main(context) {
325
324
  var _filePath4 = _step4.value;
326
325
  if (_filePath4) if (_clientnode["default"].isFileSync(_filePath4))
327
326
  // NOTE: Close handler have to be synchronous.
328
- (0, _fs.unlinkSync)(_filePath4);else if (_clientnode["default"].isDirectorySync(_filePath4)) (0, _esm.sync)(_filePath4);
327
+ (0, _fs.unlinkSync)(_filePath4);else if (_clientnode["default"].isDirectorySync(_filePath4)) (0, _rimraf.sync)(_filePath4);
329
328
  }
330
329
  } catch (err) {
331
330
  _iterator4.e(err);
332
331
  } finally {
333
332
  _iterator4.f();
334
333
  }
335
- (0, _esm.sync)((0, _globAll.sync)(configuration.path.tidyUpGlobs));
334
+ (0, _rimraf.sync)((0, _globAll.sync)(configuration.path.tidyUpGlobs));
336
335
  };
337
336
  closeEventHandlers.push(tidyUp);
338
337
 
@@ -361,7 +360,7 @@ var main = function main(context) {
361
360
 
362
361
  // NOTE: Close handler have to be synchronous.
363
362
  if (_clientnode["default"].isDirectorySync(sourcePath)) {
364
- if (_clientnode["default"].isDirectorySync(targetPath)) (0, _esm.sync)(targetPath);
363
+ if (_clientnode["default"].isDirectorySync(targetPath)) (0, _rimraf.sync)(targetPath);
365
364
  _clientnode["default"].copyDirectoryRecursiveSync(sourcePath, targetPath);
366
365
  } else if (_clientnode["default"].isFileSync(sourcePath)) _clientnode["default"].copyFileSync(sourcePath, targetPath);
367
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "2.0.1370",
3
+ "version": "2.0.1372",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -105,7 +105,7 @@
105
105
  "html-webpack-plugin": "*",
106
106
  "imports-loader": "*",
107
107
  "jest-environment-jsdom": "*",
108
- "rimraf": ">=4",
108
+ "rimraf": ">=5",
109
109
  "script-loader": "*",
110
110
  "typescript": "*",
111
111
  "webpack": "*",