增加scss的@each别名支持

master
yutent 2023-03-15 18:21:34 +08:00
parent 36fae9b388
commit c646875fd7
2 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,9 @@ export function compileScss(file, mini = true) {
if (fs.isfile(file)) { if (fs.isfile(file)) {
return scss.compile(file, { style, ...OPTIONS }).css.trim() return scss.compile(file, { style, ...OPTIONS }).css.trim()
} else { } else {
return scss.compileString(file, { style, ...OPTIONS }).css.trim() return scss
.compileString(file.replace(/@loop/g, '@each'), { style, ...OPTIONS })
.css.trim()
} }
} catch (err) { } catch (err) {
console.log('compile scss: ', file) console.log('compile scss: ', file)

View File

@ -1,7 +1,7 @@
{ {
"name": "@bd/wcui-cli", "name": "@bd/wcui-cli",
"type": "module", "type": "module",
"version": "1.0.2", "version": "1.1.0",
"bin": { "bin": {
"wcui-cli": "index.js" "wcui-cli": "index.js"
}, },