Skip to content

Commit 3b789f8

Browse files
committed
Upgrade to v3 - more options, no longer support less.js v2.0
1 parent 0be586d commit 3b789f8

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

lib/clean-css-processor.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,7 @@ module.exports = function(less) {
3333
var css = output.styles;
3434
if (sourceMap) {
3535
var sourceMapURL = sourceMap.getSourceMapURL();
36-
if (sourceMap.getCSSAppendage) {
37-
css += sourceMap.getCSSAppendage();
38-
} else {
39-
// TODO remove once latest version of less.js (>2.1.0) is released
40-
if (sourceMap.isInline()) {
41-
sourceMapURL = "data:application/json;base64," + new Buffer(output.sourceMap).toString('base64');
42-
}
43-
css += "/*# sourceMappingURL=" + sourceMapURL + " */";
44-
}
36+
css += sourceMap.getCSSAppendage();
4537
}
4638

4739
return css;

lib/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ LessPluginCleanCSS.prototype = {
1717
setOptions: function(options) {
1818
this.options = parseOptions(options);
1919
},
20-
//TODO - needs to be higher than this for work with map inline
2120
minVersion: [2, 1, 0]
2221
};
2322

lib/parse-options.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@ module.exports = function(options) {
1818
break;
1919
// for compatibility - does nothing
2020
case "skip-advanced":
21-
options.noAdvanced = true;
21+
options.advanced = false;
2222
break;
2323
case "advanced":
24-
options.noAdvanced = false;
24+
options.advanced = true;
2525
break;
26+
case "skip-rebase":
27+
options.rebase = false;
28+
break;
29+
case "skip-aggressive-merging":
30+
options.aggressiveMerging = false;
31+
break;
32+
case "skip-shorthand-compacting":
33+
options.shorthandCompacting = false;
34+
break;
35+
case "c":
2636
case "compatibility":
2737
options.compatibility = argSplit[1];
2838
break;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"node": ">=0.4.2"
2828
},
2929
"dependencies": {
30-
"clean-css": "git://github.com/jakubpawlowicz/clean-css.git#312fdf3b9d423c1e2064eb476b7970a9bcd0ffe6"
30+
"clean-css": "^3.0.1"
3131
},
3232
"devDependencies": {
3333
},

0 commit comments

Comments
 (0)