diff --git a/package.json b/package.json index 1c5be9a..fe6ef7e 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "dependencies": { "cssmin": "^0.4.3", "minimist": "^1.2.0", - "node-sass": "^3.1.2, ^4.0.0" + "node-sass": ">=3.1.2" }, "devDependencies": { "cross-spawn": "2.0.0", diff --git a/src/declarationStore.js b/src/declarationStore.js index d6d40cb..2376180 100644 --- a/src/declarationStore.js +++ b/src/declarationStore.js @@ -19,7 +19,7 @@ DeclarationStore.prototype = { var subsetRegex = new RegExp('\\' + variable + '[\\w_-]', 'g'); var isSubset = !!replacedString.match(subsetRegex); - if (!isSubset) { + if (!isSubset && variable) { var regex = new RegExp('(\\' + variable + ')([\\W\\,]?)', 'g'); replacedString = replacedString.replace(regex, value + '$2'); } diff --git a/src/processor.js b/src/processor.js index 7ee649f..b5083a8 100644 --- a/src/processor.js +++ b/src/processor.js @@ -27,7 +27,7 @@ function makeObject(declarations, options) { function filterLines(line) { return EMPTY_LINES.every(function(lineValue) { - return line !== lineValue && line.slice(0, 2) !== COMMENT_DELIMETER; + return line !== lineValue && line.slice(0, 2) !== COMMENT_DELIMETER && line.indexOf('@import') < 0; }); }