智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LightingSystemApp-serial/.svn/pristine/54/54aeda0d1661ca9d12c303c1152...

18 lines
466 B

3 years ago
const fs = require('fs')
function transformStyle(content, options) {
return content.replace(new RegExp(`\\${options.extname.style}`, 'g'), '.css')
.replace(':host', '.' + options.shadowRootHost)
}
module.exports = {
transformStyle,
transformStyleFile(filepath, options, deps) {
if (!fs.existsSync(filepath)) {
return ''
}
deps.push(filepath)
return transformStyle(fs.readFileSync(filepath, 'utf8').toString().trim(), options)
}
}