From 6ebcac3ca4d1a6a5aab86770050bf3d67ad47aec Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 20 Sep 2019 11:55:11 +0800 Subject: [PATCH] chore(cli): `npm run info` --- packages/vue-cli-plugin-uni/commands/info.js | 3 ++- packages/vue-cli-plugin-uni/lib/check-update.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/vue-cli-plugin-uni/commands/info.js b/packages/vue-cli-plugin-uni/commands/info.js index 4a0329bb04..39c1a08157 100644 --- a/packages/vue-cli-plugin-uni/commands/info.js +++ b/packages/vue-cli-plugin-uni/commands/info.js @@ -1,4 +1,5 @@ -console.log('uni-app v' + require('../package.json').version) +console.log('uni-app v' + require('@dcloudio/webpack-uni-pages-loader/package.json').version) +console.log('uni-app cli v' + require('../package.json').version) console.log(require('chalk').bold('\nEnvironment Info:')) require('envinfo').run({ System: ['OS', 'CPU'], diff --git a/packages/vue-cli-plugin-uni/lib/check-update.js b/packages/vue-cli-plugin-uni/lib/check-update.js index 317dae0ce1..d0170a2da6 100644 --- a/packages/vue-cli-plugin-uni/lib/check-update.js +++ b/packages/vue-cli-plugin-uni/lib/check-update.js @@ -23,12 +23,12 @@ module.exports = async function checkUpdate () { if (update) { if (pkg.version.split('.')[0] !== update.latest.split('.')[0]) { - console.log(`发现 uni-app 新版本 ${update.latest}`) + console.log(`发现 uni-app cli 新版本 ${update.latest}`) console.log(`1.修改 package.json 中 @dcloudio 相关包版本为 ^${update.latest}`) console.log('2.删除 package-lock.json 或 yarn.lock') console.log('3.执行 npm install 或 yarn') } else { - console.log(`发现 uni-app 新版本 ${update.latest}. 请执行 npm update 升级`) + console.log(`发现 uni-app cli 新版本 ${update.latest}. 请执行 npm update 升级`) } } } -- GitLab