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

chore(cli): remove log

上级 cef3d065
...@@ -195,7 +195,10 @@ module.exports = (api, options) => { ...@@ -195,7 +195,10 @@ module.exports = (api, options) => {
}) })
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const {
runByHBuilderX
} = require('@dcloudio/uni-cli-shared')
// log instructions & open browser on first compilation complete // log instructions & open browser on first compilation complete
let isFirstCompile = true let isFirstCompile = true
compiler.hooks.done.tap('vue-cli-service uni-serve', stats => { compiler.hooks.done.tap('vue-cli-service uni-serve', stats => {
...@@ -212,14 +215,17 @@ module.exports = (api, options) => { ...@@ -212,14 +215,17 @@ module.exports = (api, options) => {
const networkUrl = publicUrl const networkUrl = publicUrl
? publicUrl.replace(/([^/])$/, '$1/') ? publicUrl.replace(/([^/])$/, '$1/')
: urls.lanUrlForTerminal : urls.lanUrlForTerminal
const printRunningAt = !runByHBuilderX || (runByHBuilderX && isFirstCompile)
console.log() printRunningAt && console.log()
console.log(` App running at:`) printRunningAt && console.log(` App running at:`)
console.log( printRunningAt && console.log(
` - Local: ${chalk.cyan(urls.localUrlForTerminal)} ${copied}` ` - Local: ${chalk.cyan(urls.localUrlForTerminal)} ${copied}`
) )
if (!printRunningAt) {
console.log(`Build complete. Watching for changes...`)
}
if (!isInContainer) { if (!isInContainer) {
console.log(` - Network: ${chalk.cyan(networkUrl)}`) printRunningAt && console.log(` - Network: ${chalk.cyan(networkUrl)}`)
} else { } else {
console.log() console.log()
console.log(chalk.yellow( console.log(chalk.yellow(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册