mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-06 14:28:45 -06:00
chore: Make the logging consistent and pretty (#1925)
This commit is contained in:
committed by
Evan You
parent
0effec2b97
commit
17f37187f0
@@ -141,7 +141,6 @@ module.exports = class Creator extends EventEmitter {
|
||||
}
|
||||
|
||||
// run generator
|
||||
log()
|
||||
log(`🚀 Invoking generators...`)
|
||||
this.emit('creation', { event: 'invoking-generators' })
|
||||
const plugins = await this.resolvePlugins(preset.plugins)
|
||||
@@ -163,7 +162,6 @@ module.exports = class Creator extends EventEmitter {
|
||||
}
|
||||
|
||||
// run complete cbs if any (injected by generators)
|
||||
log()
|
||||
logWithSpinner('⚓', `Running completion hooks...`)
|
||||
this.emit('creation', { event: 'completion-hooks' })
|
||||
for (const cb of createCompleteCbs) {
|
||||
|
||||
@@ -6,7 +6,6 @@ const {
|
||||
log,
|
||||
error,
|
||||
hasProjectYarn,
|
||||
stopSpinner,
|
||||
resolvePluginId,
|
||||
resolveModule,
|
||||
loadModule
|
||||
@@ -30,9 +29,6 @@ async function add (pluginName, options = {}, context = process.cwd()) {
|
||||
const packageManager = loadOptions().packageManager || (hasProjectYarn(context) ? 'yarn' : 'npm')
|
||||
await installPackage(context, packageManager, null, packageName)
|
||||
|
||||
stopSpinner()
|
||||
|
||||
log()
|
||||
log(`${chalk.green('✔')} Successfully installed plugin: ${chalk.cyan(packageName)}`)
|
||||
log()
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ async function runGenerator (context, plugin, pkg = getPkg(context)) {
|
||||
|
||||
if (!isTestOrDebug && depsChanged) {
|
||||
log(`📦 Installing additional dependencies...`)
|
||||
log()
|
||||
const packageManager =
|
||||
loadOptions().packageManager || (hasProjectYarn(context) ? 'yarn' : 'npm')
|
||||
await installDeps(context, packageManager)
|
||||
@@ -141,12 +142,11 @@ async function runGenerator (context, plugin, pkg = getPkg(context)) {
|
||||
for (const cb of createCompleteCbs) {
|
||||
await cb()
|
||||
}
|
||||
stopSpinner()
|
||||
log()
|
||||
}
|
||||
|
||||
stopSpinner()
|
||||
|
||||
log()
|
||||
log(` Successfully invoked generator for plugin: ${chalk.cyan(plugin.id)}`)
|
||||
log(`${chalk.green('✔')} Successfully invoked generator for plugin: ${chalk.cyan(plugin.id)}`)
|
||||
if (!process.env.VUE_CLI_TEST && hasProjectGit(context)) {
|
||||
const { stdout } = await execa('git', [
|
||||
'ls-files',
|
||||
|
||||
Reference in New Issue
Block a user