From 6671f063cea9d4278db04abe25c95c868778b4e6 Mon Sep 17 00:00:00 2001 From: sodatea Date: Tue, 26 Jan 2016 00:17:46 +0800 Subject: [PATCH 1/5] Extend the example to avoid misleading --- doc/options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/options.md b/doc/options.md index 8be912bc..317a6d9f 100644 --- a/doc/options.md +++ b/doc/options.md @@ -41,7 +41,7 @@ Following options are ignored while processing `*.sass` files: ## always-semicolon -Whether to add a semicolon after the last value/mixin. +Whether to add a semicolon after the *last* value/mixin. Acceptable value: `true`. @@ -49,10 +49,10 @@ Example: `{ "always-semicolon": true }` ```css /* before */ -a { color: red } +a { color: red; text-decoration: underline } /* after */ -a { color: red; } +a { color: red; text-decoration: underline; } ``` ### always-semicolon vs. preprocessors From 2a517fdeac9b9680582850af15fa474ee6fb9d26 Mon Sep 17 00:00:00 2001 From: Neil Duffy Date: Mon, 27 Jun 2016 17:19:46 -0500 Subject: [PATCH 2/5] adding the syntax option --- lib/cli.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cli.js b/lib/cli.js index 0c99bd2e..63183013 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -17,6 +17,7 @@ program .option('-c, --config [path]', 'configuration file path') .option('-d, --detect', 'detect mode (would return detected options)') .option('-l, --lint', 'in case some fixes needed returns an error') + .option('-s, --syntax [extension]', 'force parsing with a certain syntax') .parse(process.argv); if (!program.args.length) { @@ -67,6 +68,7 @@ console.time('spent'); config.verbose = program.verbose === true || config.verbose; config.lint = program.lint; +config.syntax = program.syntax; comb.configure(config); From 39df5126290999a156c81bf49bcc36a3b62f29a5 Mon Sep 17 00:00:00 2001 From: Neil Duffy Date: Mon, 27 Jun 2016 17:36:28 -0500 Subject: [PATCH 3/5] referencing the updated comb core --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 94352e3e..454bb44c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "commander": "2.0.0", - "csscomb-core": "3.0.0-3", + "csscomb-core": "git://github.com/conceptualitis/core#fa6f4c4", "gonzales-pe": "3.0.0-28", "vow": "0.4.4" }, From 040b63d1e04ede88ff68dcce27fbec3ba578ce38 Mon Sep 17 00:00:00 2001 From: Neil Duffy Date: Mon, 27 Jun 2016 18:24:28 -0500 Subject: [PATCH 4/5] getting a working version of csscomb-core --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 454bb44c..59f5c430 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "commander": "2.0.0", - "csscomb-core": "git://github.com/conceptualitis/core#fa6f4c4", + "csscomb-core": "git://github.com/conceptualitis/core#8e356a6", "gonzales-pe": "3.0.0-28", "vow": "0.4.4" }, From e199caa097f818df2f8418cc3229864c3b5744af Mon Sep 17 00:00:00 2001 From: Neil Duffy Date: Mon, 27 Jun 2016 18:37:20 -0500 Subject: [PATCH 5/5] adding bad support for mixins --- lib/options/sort-order.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/options/sort-order.js b/lib/options/sort-order.js index 03adb288..1e81358e 100644 --- a/lib/options/sort-order.js +++ b/lib/options/sort-order.js @@ -297,6 +297,10 @@ module.exports = { currentNode.get(0).content === 'import') { // Look for imports propertyName = '$import'; break; + } else if (currentNode.is('atkeyword') && + currentNode.get(0).content === 'mixin') { + propertyName = '$mixin'; + break; } } }