From 56d8b8338bd6d9325b1b97569493704272281a70 Mon Sep 17 00:00:00 2001 From: Florent Clerc Date: Mon, 3 Jun 2019 16:53:55 +0200 Subject: [PATCH 1/3] ignore imports --- src/processor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }); } From 391a17424c475b8d3e9a11e112f08e94f72b72a6 Mon Sep 17 00:00:00 2001 From: Florent Clerc Date: Mon, 3 Jun 2019 17:23:17 +0200 Subject: [PATCH 2/3] ensure there is a variable --- src/declarationStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); } From 22f96587877bf14cfa22601f928a815d923f8cc8 Mon Sep 17 00:00:00 2001 From: Julien Deniau Date: Tue, 17 Jan 2023 11:23:28 +0100 Subject: [PATCH 3/3] allow all node-sass verion --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",