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

feat(cli): wxcomponents (uni_modules)

上级 ce934705
...@@ -91,12 +91,17 @@ module.exports = (api, options) => { ...@@ -91,12 +91,17 @@ module.exports = (api, options) => {
) )
) { ) {
const migrate = require('@dcloudio/uni-migration') const migrate = require('@dcloudio/uni-migration')
const wxcomponents = path.resolve(process.env.UNI_INPUT_DIR, 'wxcomponents') const wxcomponentDirs = [path.resolve(process.env.UNI_INPUT_DIR, 'wxcomponents')]
if (fs.existsSync(wxcomponents)) { // 转换 mp-weixin 小程序组件 global.uniModules.forEach(module => {
migrate(wxcomponents, false, { wxcomponentDirs.push(path.resolve(process.env.UNI_INPUT_DIR, 'uni_modules', module, 'wxcomponents'))
silent: true // 不输出日志 })
}) 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.
先完成此消息的编辑!
想要评论请 注册