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 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); 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; } } } diff --git a/package.json b/package.json index 94352e3e..59f5c430 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#8e356a6", "gonzales-pe": "3.0.0-28", "vow": "0.4.4" },