修复编译
parent
946c240c18
commit
464e730143
|
@ -31,16 +31,15 @@ function parse(origin, target, name) {
|
||||||
let code = fs.cat(origin).toString()
|
let code = fs.cat(origin).toString()
|
||||||
console.log('编译 %s ...', blue(name))
|
console.log('编译 %s ...', blue(name))
|
||||||
try {
|
try {
|
||||||
|
code = code.replace(/css`([\w\W]*?)`/g, function (m, scss) {
|
||||||
|
scss = compileScss(scss)
|
||||||
|
return `css\`${scss}\``
|
||||||
|
})
|
||||||
code = Es.transformSync(code, OPTIONS).code
|
code = Es.transformSync(code, OPTIONS).code
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('compile scss: ', name)
|
console.log('compile scss: ', name)
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
code = code.replace(/css`([\w\W]*?)`/g, function (m, scss) {
|
|
||||||
scss = compileScss(scss)
|
|
||||||
return `css\`${scss}\``
|
|
||||||
})
|
|
||||||
fs.echo(code, target)
|
fs.echo(code, target)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@bd/wcui-cli",
|
"name": "@bd/wcui-cli",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"bin": {
|
"bin": {
|
||||||
"wcui-cli": "index.js"
|
"wcui-cli": "index.js"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue