Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions packages/@vue/cli/lib/Creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,8 @@ module.exports = class Creator extends EventEmitter {
// run complete cbs if any (injected by generators)
log(`⚓ Running completion hooks...`)
this.emit('creation', { event: 'completion-hooks' })
for (const cb of afterInvokeCbs) {
await cb()
}
for (const cb of afterAnyInvokeCbs) {
await cb()
}
await Promise.all(afterInvokeCbs.map((cb) => cb()))
await Promise.all(afterAnyInvokeCbs.map((cb) => cb()))

if (!generator.files['README.md']) {
// generate README.md
Expand Down
4 changes: 1 addition & 3 deletions packages/@vue/cli/lib/Generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,7 @@ module.exports = class Generator {
}
})

for (const postProcess of this.postProcessFilesCbs) {
await postProcess(files)
}
await Promise.all(this.postProcessFilesCbs.map((postProcess) => postProcess(files)))
debug('vue:cli-files')(this.files)
}

Expand Down
8 changes: 2 additions & 6 deletions packages/@vue/cli/lib/invoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,8 @@ async function runGenerator (context, plugin, pkg = getPkg(context)) {

if (afterInvokeCbs.length || afterAnyInvokeCbs.length) {
logWithSpinner('⚓', `Running completion hooks...`)
for (const cb of afterInvokeCbs) {
await cb()
}
for (const cb of afterAnyInvokeCbs) {
await cb()
}
await Promise.all(afterInvokeCbs.map((cb) => cb()))
await Promise.all(afterAnyInvokeCbs.map((cb) => cb()))
stopSpinner()
log()
}
Expand Down