From d762eade9851678e12c196d269dc1cf9ef237bd4 Mon Sep 17 00:00:00 2001 From: ykforerlang <1527997464@qq.com> Date: Thu, 19 Sep 2019 15:19:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(alita):=20=E6=94=B9=E5=96=84=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=AE=8C=E6=88=90=E4=B9=8B=E5=90=8E=E7=9A=84=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/filewatch/index.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/filewatch/index.js b/src/filewatch/index.js index e01615a..c14e7c6 100644 --- a/src/filewatch/index.js +++ b/src/filewatch/index.js @@ -51,10 +51,23 @@ export default (ignored) => { .on('ready', () => { eventEmitter.once(DONE_EVENT, () => { if (watchMode) { - console.log(`转化完成!监听文件修改...`.info) + successLog() + console.log(`监听文件修改...`.info) } else { - console.log('转化完成!'.info) + successLog() } }) }) +} + +function successLog() { + const {outdir} = global.execArgs + console.log('') + console.log('编译完成,Run instructions for 小程序:'.info) + console.log(` • cd ${outdir}`.black) + console.log(` • npm install`.black) + console.log(` • 开发者工具从 ${outdir} 导入项目`.black) + console.log(` • 从开发者工具构建npm: 工具 --> 构建npm`.black) + console.log(` • 由于构建npm在导入项目之后,可能会出现找不到包的错误,此时需要重启开发者工具,或者重新导入项目`.warn) + console.log('') } \ No newline at end of file