See [changes](https://github.com/jakubpawlowicz/clean-css/compare/b06f37d...dd8c14a).
* Renames `noAdvanced` option into `advanced`.
* Renames `noAggressiveMerging` option into `aggressiveMerging`.
+* Renames `noRebase` option into `rebase`.
* Speeds up advanced processing by shortening optimize loop.
* Fixed issue [#360](https://github.com/GoalSmashers/clean-css/issues/360) - adds 7 extra CSS colors.
* `noAdvanced` became `advanced` - make sure to reverse the value;
* `noAggressiveMerging` became `aggressiveMerging` - make sure to reverse the value;
+* `noRebase` became `rebase` - make sure to reverse the value;
* no longer possible to use `CleanCSS` as a function as `new CleanCSS` is always required;
### How to upgrade clean-css from 1.x to 2.x?
* `inliner` - a hash of options for `@import` inliner, see test/protocol-imports-test.js for examples
* `keepBreaks` - whether to keep line breaks (default is false)
* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one only, `0` for removing all
-* `noRebase` - whether to skip URLs rebasing
* `processImport` - whether to process `@import` rules
+* `rebase` - set to false to skip URL rebasing
* `relativeTo` - path to __resolve__ relative `@import` rules and URLs
* `root` - path to __resolve__ absolute `@import` rules and __rebase__ relative URLs
* `roundingPrecision` - Rounding precision, defaults to 2.
if (commands.skipImport)
cleanOptions.processImport = false;
if (commands.skipRebase)
- cleanOptions.noRebase = true;
+ cleanOptions.rebase = false;
if (commands.skipAdvanced)
cleanOptions.advanced = false;
if (commands.skipAggressiveMerging)
if (commands.timeout)
cleanOptions.inliner = { timeout: parseFloat(commands.timeout) * 1000 };
if (commands.args.length > 0) {
- var relativeTo = (cleanOptions.noRebase ? false : cleanOptions.root) || commands.args[0];
+ var relativeTo = (cleanOptions.rebase ? cleanOptions.root : false) || commands.args[0];
cleanOptions.relativeTo = path.dirname(path.resolve(relativeTo));
options.sources = commands.args.map(function(source) {
inliner: options.inliner,
keepBreaks: options.keepBreaks || false,
keepSpecialComments: 'keepSpecialComments' in options ? options.keepSpecialComments : '*',
- noRebase: options.noRebase,
processImport: undefined === options.processImport ? true : false,
+ rebase: undefined === options.rebase ? true : false,
relativeTo: options.relativeTo,
root: options.root,
roundingPrecision: options.roundingPrecision,
run(selectorsOptimizer, 'process');
run(freeTextProcessor, 'restore');
run(urlsProcessor, 'restore');
- run(urlRebase, 'process', !options.noRebase);
+ run(urlRebase, 'process', options.rebase);
run(expressionsProcessor, 'restore');
run(commentsProcessor, 'restore');