Removes property optimizer from simple optimizations.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Mon, 6 Oct 2014 13:42:12 +0000 (14:42 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Fri, 10 Oct 2014 20:22:46 +0000 (21:22 +0100)
lib/selectors/optimizer.js
lib/selectors/optimizers/simple.js

index 9c6e21f..2ec661f 100644 (file)
@@ -40,7 +40,7 @@ function rebuild(tokens, keepBreaks, isFlatBlock) {
 SelectorsOptimizer.prototype.process = function (data) {
   var tokens = new Tokenizer(this.context).toTokens(data);
 
-  new SimpleOptimizer(this.options, this.context).optimize(tokens);
+  new SimpleOptimizer(this.options).optimize(tokens);
   if (!this.options.noAdvanced)
     new AdvancedOptimizer(this.options, this.context).optimize(tokens);
 
index 5383da6..dac5daf 100644 (file)
@@ -1,4 +1,3 @@
-var PropertyOptimizer = require('../../properties/optimizer');
 var CleanUp = require('./clean-up');
 var Splitter = require('../../utils/splitter');
 
@@ -10,9 +9,8 @@ var DEFAULT_ROUNDING_PRECISION = 2;
 var CHARSET_TOKEN = '@charset';
 var CHARSET_REGEXP = new RegExp('^' + CHARSET_TOKEN, 'i');
 
-function SimpleOptimizer(options, context) {
+function SimpleOptimizer(options) {
   this.options = options;
-  this.propertyOptimizer = new PropertyOptimizer(this.options.compatibility, this.options.aggressiveMerging, context);
 
   var units = ['px', 'em', 'ex', 'cm', 'mm', 'in', 'pt', 'pc', '%'];
   if (['ie7', 'ie8'].indexOf(options.compatibility) == -1)