Skip to content

Commit d4b3ae3

Browse files
committed
Add editorconfig from the main less project
1 parent a0ebe59 commit d4b3ae3

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @see http://editorconfig.org/
2+
3+
# the buck stops here
4+
root = true
5+
6+
# all files
7+
[*]
8+
end_of_line = LF
9+
indent_style = space
10+
indent_size = 4
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ and then on the command line,
2424
lessc file.less --clean-css="--s1 --advanced --compatibility=ie8"
2525
```
2626

27-
See [clean-css](https://github.com/jakubpawlowicz/clean-css/tree/v3.0.1#how-to-use-clean-css-programmatically) for the available command options - the only differences are `advanced` and `rebase` which we default to false, because it is not always entirely safe.
27+
See [clean-css](https://github.com/jakubpawlowicz/clean-css/tree/v3.0.1#how-to-use-clean-css-programmatically) for the
28+
available command options - the only differences are `advanced` and `rebase` which we default to false, because it is
29+
not always entirely safe.
2830

2931
## Programmatic usage
3032

3133
```js
3234
var LessPluginCleanCSS = require('less-plugin-clean-css'),
3335
cleanCSSPlugin = new LessPluginCleanCSS({advanced: true});
34-
less.render(lessString, { plugins: [cleanCSSPlugin] })
35-
.then(
36+
less.render(lessString, {plugins: [cleanCSSPlugin]})
37+
.then(
3638
```
3739
3840
## Browser usage

lib/clean-css-processor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const CleanCSS = require("clean-css");
44

5-
module.exports = function() {
5+
module.exports = function () {
66
function CleanCSSProcessor(options) {
77
this.options = options || {};
88
}

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ function LessPluginCleanCSS(options) {
99
}
1010

1111
LessPluginCleanCSS.prototype = {
12-
install: function(less, pluginManager) {
12+
install: function (less, pluginManager) {
1313
const CleanCSSProcessor = getCleanCSSProcessor(less);
1414
pluginManager.addPostProcessor(new CleanCSSProcessor(this.options));
1515
},
1616
printUsage: function () {
1717
usage.printUsage();
1818
},
19-
setOptions: function(options) {
19+
setOptions: function (options) {
2020
this.options = parseOptions(options);
2121
},
2222
minVersion: [2, 1, 0]

lib/parse-options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
module.exports = function(options) {
3+
module.exports = function (options) {
44
if (typeof options === "string") {
55
const cleanOptionArgs = options.split(" ");
66
options = {};

lib/usage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22

33
module.exports = {
4-
printUsage: function() {
4+
printUsage: function () {
55
console.log("");
66
console.log("Clean CSS Plugin");
77
console.log("specify plugin with --clean-css");
@@ -13,7 +13,7 @@ module.exports = {
1313
this.printOptions();
1414
console.log("");
1515
},
16-
printOptions: function() {
16+
printOptions: function () {
1717
console.log("we support the following arguments... 'keep-line-breaks', 'b'");
1818
console.log("'s0', 's1', 'advanced', 'rebase', 'keepSpecialComments', compatibility', 'rounding-precision'");
1919
console.log("'skip-aggressive-merging', 'skip-shorthand-compacting'");

0 commit comments

Comments
 (0)