提交 cdbe8245 编写于 作者: fxy060608's avatar fxy060608

feat(cli): wxcomponents (uni_modules)

上级 ce934705
......@@ -91,12 +91,17 @@ module.exports = (api, options) => {
)
) {
const migrate = require('@dcloudio/uni-migration')
const wxcomponents = path.resolve(process.env.UNI_INPUT_DIR, 'wxcomponents')
if (fs.existsSync(wxcomponents)) { // 转换 mp-weixin 小程序组件
migrate(wxcomponents, false, {
silent: true // 不输出日志
})
}
const wxcomponentDirs = [path.resolve(process.env.UNI_INPUT_DIR, 'wxcomponents')]
global.uniModules.forEach(module => {
wxcomponentDirs.push(path.resolve(process.env.UNI_INPUT_DIR, 'uni_modules', module, 'wxcomponents'))
})
wxcomponentDirs.forEach(wxcomponentsDir => {
if (fs.existsSync(wxcomponentsDir)) { // 转换 mp-weixin 小程序组件
migrate(wxcomponentsDir, false, {
silent: true // 不输出日志
})
}
})
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册