weboptimizer 3.0.25 → 3.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "3.0.25",
3
+ "version": "3.0.26",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -741,6 +741,7 @@
741
741
  },
742
742
  "givenCommandLineArguments": [],
743
743
  "hashAlgorithm": "md5",
744
+ "imageSprite": {},
744
745
  "injection": {
745
746
  "autoExclude": {
746
747
  "paths": [
package/type.d.ts CHANGED
@@ -298,6 +298,7 @@ export interface ResolvedConfiguration {
298
298
  };
299
299
  givenCommandLineArguments: Array<string>;
300
300
  hashAlgorithm: string;
301
+ imageSprite: PlainObject;
301
302
  injection: InjectionConfiguration;
302
303
  inPlace: InPlaceConfiguration;
303
304
  library: boolean;
@@ -91,7 +91,7 @@ _clientnode.Logger.configureAllInstances({
91
91
  level: configuration.debug ? 'debug' : 'warn'
92
92
  });
93
93
  var _module = configuration.module;
94
- // region initialisation
94
+ // region initialization
95
95
  /// region determine library name
96
96
  var libraryName;
97
97
  if (configuration.libraryName) libraryName = configuration.libraryName;else if (Object.keys(configuration.injection.entry.normalized).length > 1) libraryName = '[name]';else {
@@ -664,11 +664,9 @@ var cssUse = _module.preprocessor.cascadingStyleSheet.additional.pre.map(createE
664
664
  }]
665
665
  }) : [], postcssURL ? postcssURL({
666
666
  url: 'rebase'
667
- }) : [], postcssSprites ? postcssSprites({
667
+ }) : [], postcssSprites ? postcssSprites(_objectSpread({
668
668
  filterBy: function filterBy() {
669
- return new Promise(function (resolve, reject) {
670
- (configuration.files.compose.image ? resolve : reject)();
671
- });
669
+ return configuration.files.compose.image ? Promise.resolve() : Promise.reject(new Error());
672
670
  },
673
671
  hooks: {
674
672
  onSaveSpritesheet: function onSaveSpritesheet(image) {
@@ -691,7 +689,7 @@ var cssUse = _module.preprocessor.cascadingStyleSheet.additional.pre.map(createE
691
689
  },
692
690
  stylesheetPath: configuration.path.source.asset.cascadingStyleSheet,
693
691
  spritePath: configuration.path.source.asset.image
694
- }) : [], _module.preprocessor.cascadingStyleSheet.additional.plugins.post.map(createEvaluateMapper('css.postcss')), _module.optimizer.cssnano && postcssCSSnano ? postcssCSSnano(_module.optimizer.cssnano) : [])
692
+ }, configuration.imageSprite)) : [], _module.preprocessor.cascadingStyleSheet.additional.plugins.post.map(createEvaluateMapper('css.postcss')), _module.optimizer.cssnano && postcssCSSnano ? postcssCSSnano(_module.optimizer.cssnano) : [])
695
693
  }
696
694
  } : {}, _module.preprocessor.cascadingStyleSheet.options || {})
697
695
  } : [], _module.preprocessor.cascadingStyleSheet.additional.post.map(createEvaluateMapper('css')));