* Adds simplified and more advanced text escaping / restoring via EscapeStore class.
+1.1.4 / 2013-xx-xx (UNRELEASED)
+==================
+
+* Fixed issue [#152](https://github.com/GoalSmashers/clean-css/issues/152) - adds an option to disable rebasing.
+
1.1.3 / 2013-10-04
==================
--s1 Remove all special comments but the first one
-r, --root [root-path] A root path to which resolve absolute @import rules and rebase relative URLs
-o, --output [output-file] Use [output-file] as output instead of STDOUT
--s, --skip-import Disable the @import processing
+-s, --skip-import Disable @import processing
+--skip-rebase Disable URLs rebasing
-d, --debug Shows debug information (minification time & compression efficiency)
```
* `root` - path to resolve absolute `@import` rules and rebase relative URLs
* `relativeTo` - path with which to resolve relative `@import` rules and URLs
* `processImport` - whether to process `@import` rules
+* `noRebase` - whether to skip URLs rebasing
### What are the clean-css' dev commands?
.option('--s1', 'Remove all special comments but the first one')
.option('-r, --root [root-path]', 'Set a root path to which resolve absolute @import rules')
.option('-o, --output [output-file]', 'Use [output-file] as output instead of STDOUT')
- .option('-s, --skip-import', 'Disable the @import processing')
+ .option('-s, --skip-import', 'Disable @import processing')
+ .option('--skip-rebase', 'Disable URLs rebasing')
.option('-d, --debug', 'Shows debug information (minification time & compression efficiency)');
commands.on('--help', function() {
cleanOptions.root = commands.root;
if (commands.skipImport)
cleanOptions.processImport = false;
+if (commands.skipRebase)
+ cleanOptions.noRebase = true;
if (commands.debug)
options.debug = true;
if (commands.args.length > 0) {
data = urlsProcessor.restore(data);
});
replace(function rebaseUrls() {
- data = UrlRebase.process(data, options);
+ data = options.noRebase ? data : UrlRebase.process(data, options);
});
replace(function restoreFreeText() {
data = freeTextProcessor.restore(data);
deleteFile('./test/data/129-assets/assets/ui.bundled.css');
}
})
+ },
+ 'complex import and skipped url rebasing': {
+ absolute: binaryContext('-r ./test/data/129-assets --skip-rebase ./test/data/129-assets/assets/ui.css', {
+ 'should rebase urls correctly': function(error, stdout) {
+ assert.equal(error, null);
+ assert.include(stdout, 'url(../components/bootstrap/images/glyphs.gif)');
+ assert.include(stdout, 'url(../components/jquery-ui/images/prev.gif)');
+ assert.include(stdout, 'url(../components/jquery-ui/images/next.gif)');
+ }
+ })
}
});