From c646875fd789d2f0659ff1ce78b426f8debcc1f2 Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 15 Mar 2023 18:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0scss=E7=9A=84@each=E5=88=AB?= =?UTF-8?q?=E5=90=8D=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index e3a9ee6..bf442f8 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -17,7 +17,9 @@ export function compileScss(file, mini = true) { if (fs.isfile(file)) { return scss.compile(file, { style, ...OPTIONS }).css.trim() } else { - return scss.compileString(file, { style, ...OPTIONS }).css.trim() + return scss + .compileString(file.replace(/@loop/g, '@each'), { style, ...OPTIONS }) + .css.trim() } } catch (err) { console.log('compile scss: ', file) diff --git a/package.json b/package.json index 12898c5..020e72c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@bd/wcui-cli", "type": "module", - "version": "1.0.2", + "version": "1.1.0", "bin": { "wcui-cli": "index.js" },