==================
* Allows `target` option to be a path to a folder instead of a file.
+* Breaks 2.x compatibility for using CleanCSS as a function.
* Fixed issue [#360](https://github.com/GoalSmashers/clean-css/issues/360) - adds 7 extra CSS colors.
[2.2.16 / 2014-09-16](https://github.com/jakubpawlowicz/clean-css/compare/v2.2.15...v2.2.16)
var CleanCSS = module.exports = function CleanCSS(options) {
options = options || {};
- // back compat
- if (!(this instanceof CleanCSS))
- return new CleanCSS(options);
-
options.keepBreaks = options.keepBreaks || false;
//active by default
assert.equal(minify('a{ color: #f00; }'), 'a{color:red}');
}
},
- 'initialization without new (back-compat)': {
- topic: function() {
- return CleanCSS();
- },
- 'should have stats, errors, etc.': function(css) {
- assert.isObject(css.stats);
- assert.isArray(css.errors);
- assert.isArray(css.warnings);
- assert.isString(css.lineBreak);
- },
- 'should minify CSS correctly': function(css) {
- assert.equal(css.minify('a{ color: #f00; }'), 'a{color:red}');
- }
- },
'extended via prototype': {
topic: function() {
CleanCSS.prototype.foo = function(data, callback) {