mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-19 10:41:10 -05:00
avoid checking latency twice
This commit is contained in:
@@ -72,7 +72,7 @@ module.exports = class Creator {
|
||||
// in development, avoid installation process
|
||||
setupDevProject(context, deps)
|
||||
} else {
|
||||
await installDeps(context, options, deps)
|
||||
await installDeps(context, options.packageManager, deps)
|
||||
}
|
||||
|
||||
// run generator
|
||||
@@ -90,7 +90,7 @@ module.exports = class Creator {
|
||||
// install additional deps (injected by generators)
|
||||
logWithSpinner('📦', `Installing additional dependencies...`)
|
||||
if (!process.env.VUE_CLI_TEST) {
|
||||
await installDeps(context, options)
|
||||
await installDeps(context, options.packageManager)
|
||||
}
|
||||
|
||||
// run complete cbs if any (injected by generators)
|
||||
|
||||
@@ -26,9 +26,9 @@ const findFastestRegistry = () => {
|
||||
}))
|
||||
}
|
||||
|
||||
module.exports = async function installDeps (targetDir, options, deps) {
|
||||
const command = options.packageManager
|
||||
const registry = await findFastestRegistry()
|
||||
let registry
|
||||
module.exports = async function installDeps (targetDir, command, deps) {
|
||||
registry = registry || await findFastestRegistry()
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
const args = []
|
||||
|
||||
Reference in New Issue
Block a user