Skip to content

Commit 17f3718

Browse files
pksunkarayyx990803
authored andcommitted
chore: Make the logging consistent and pretty (vuejs#1925)
1 parent 0effec2 commit 17f3718

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

packages/@vue/cli/lib/Creator.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ module.exports = class Creator extends EventEmitter {
141141
}
142142

143143
// run generator
144-
log()
145144
log(`🚀 Invoking generators...`)
146145
this.emit('creation', { event: 'invoking-generators' })
147146
const plugins = await this.resolvePlugins(preset.plugins)
@@ -163,7 +162,6 @@ module.exports = class Creator extends EventEmitter {
163162
}
164163

165164
// run complete cbs if any (injected by generators)
166-
log()
167165
logWithSpinner('⚓', `Running completion hooks...`)
168166
this.emit('creation', { event: 'completion-hooks' })
169167
for (const cb of createCompleteCbs) {

packages/@vue/cli/lib/add.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const {
66
log,
77
error,
88
hasProjectYarn,
9-
stopSpinner,
109
resolvePluginId,
1110
resolveModule,
1211
loadModule
@@ -30,9 +29,6 @@ async function add (pluginName, options = {}, context = process.cwd()) {
3029
const packageManager = loadOptions().packageManager || (hasProjectYarn(context) ? 'yarn' : 'npm')
3130
await installPackage(context, packageManager, null, packageName)
3231

33-
stopSpinner()
34-
35-
log()
3632
log(`${chalk.green('✔')} Successfully installed plugin: ${chalk.cyan(packageName)}`)
3733
log()
3834

packages/@vue/cli/lib/invoke.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ async function runGenerator (context, plugin, pkg = getPkg(context)) {
131131

132132
if (!isTestOrDebug && depsChanged) {
133133
log(`📦 Installing additional dependencies...`)
134+
log()
134135
const packageManager =
135136
loadOptions().packageManager || (hasProjectYarn(context) ? 'yarn' : 'npm')
136137
await installDeps(context, packageManager)
@@ -141,12 +142,11 @@ async function runGenerator (context, plugin, pkg = getPkg(context)) {
141142
for (const cb of createCompleteCbs) {
142143
await cb()
143144
}
145+
stopSpinner()
146+
log()
144147
}
145148

146-
stopSpinner()
147-
148-
log()
149-
log(` Successfully invoked generator for plugin: ${chalk.cyan(plugin.id)}`)
149+
log(`${chalk.green('✔')} Successfully invoked generator for plugin: ${chalk.cyan(plugin.id)}`)
150150
if (!process.env.VUE_CLI_TEST && hasProjectGit(context)) {
151151
const { stdout } = await execa('git', [
152152
'ls-files',

0 commit comments

Comments
 (0)