==================
* Adds a better non-adjacent optimizer compatible with the upcoming new property optimizer.
+* Fixed issue [#247](https://github.com/GoalSmashers/clean-css/issues/247) - removes deprecated `selectorsMergeMode` switch.
[2.1.2 / 2014-02-25](https://github.com/GoalSmashers/clean-css/compare/v2.1.1...v2.1.2)
==================
--skip-rebase Disable URLs rebasing
--skip-advanced Disable advanced optimizations - selector & property merging,
reduction, etc.
---selectors-merge-mode [ie8|*] DEPRECATED: Use --compatibility switch
-c, --compatibility [ie7|ie8] Force compatibility mode
-d, --debug Shows debug information (minification time & compression efficiency)
```
* `processImport` - whether to process `@import` rules
* `noRebase` - whether to skip URLs rebasing
* `noAdvanced` - set to true to disable advanced optimizations - selector & property merging, reduction, etc.
-* `selectorsMergeMode` - DEPRECATED: Use compatibility option
* `compatibility` - Force compatibility mode to `ie7` or `ie8`. Defaults to not set.
* `debug` - set to true to get minification statistics under `stats` property (see `test/custom-test.js` for examples)
.option('-s, --skip-import', 'Disable @import processing')
.option('--skip-rebase', 'Disable URLs rebasing')
.option('--skip-advanced', 'Disable advanced optimizations - selector & property merging, reduction, etc.')
- .option('--selectors-merge-mode [ie8|*]', 'DEPRECATED: Use --compatibility switch')
.option('-c, --compatibility [ie7|ie8]', 'Force compatibility mode')
.option('-t, --timeout [seconds]', 'Per connection timeout when fetching remote @imports (defaults to 5 seconds)')
.option('-d, --debug', 'Shows debug information (minification time & compression efficiency)');
cleanOptions.noAdvanced = true;
if (commands.compatibility)
cleanOptions.compatibility = commands.compatibility;
-if (commands.selectorsMergeMode) {
- console.warn('--selectors-merge-mode is deprecated and will be removed in clean-css 2.2. Please use --compatibility %s switch instead.', commands.selectorsMergeMode);
- cleanOptions.compatibility = commands.selectorsMergeMode;
-}
if (commands.debug)
cleanOptions.debug = true;
if (commands.timeout)
if (undefined === options.processImport)
options.processImport = true;
- if (options.selectorsMergeMode) {
- console.warn('selectorsMergeMode is deprecated and will be removed in clean-css 2.2. Please use compatibility: \'%s\' option instead.', options.selectorsMergeMode);
- options.compatibility = options.selectorsMergeMode;
- }
-
this.options = options;
this.stats = {};
this.context = {
replace(/\}/g, '}' + lineBreak);
} else {
replace(function optimizeSelectors() {
- var mergeMode = ['ie7', 'ie8'].indexOf(options.compatibility) > -1 ?
- options.compatibility :
- '*';
data = new SelectorsOptimizer(data, context, {
keepBreaks: options.keepBreaks,
lineBreak: lineBreak,
- selectorsMergeMode: mergeMode,
compatibility: options.compatibility
}).process();
});
};
var isSpecial = function(selector) {
- return specialSelectors[options.selectorsMergeMode || '*'].test(selector);
+ return specialSelectors[options.compatibility || '*'].test(selector);
};
var removeDuplicates = function(tokens) {