diff --git a/packages/@vue/cli-ui/src/components/InstantSearchInput.vue b/packages/@vue/cli-ui/src/components/InstantSearchInput.vue index f0a774c5d..647a0faa4 100644 --- a/packages/@vue/cli-ui/src/components/InstantSearchInput.vue +++ b/packages/@vue/cli-ui/src/components/InstantSearchInput.vue @@ -1,6 +1,7 @@ diff --git a/packages/@vue/cli/lib/util/installDeps.js b/packages/@vue/cli/lib/util/installDeps.js index 1bc9e4575..a1ebb1fff 100644 --- a/packages/@vue/cli/lib/util/installDeps.js +++ b/packages/@vue/cli/lib/util/installDeps.js @@ -281,3 +281,23 @@ exports.installPackage = async function (targetDir, command, cliRegistry, packag await executeCommand(command, args, targetDir) } + +exports.uninstallPackage = async function (targetDir, command, cliRegistry, packageName) { + const args = [] + if (command === 'npm') { + args.push('uninstall', '--loglevel', 'error') + } else if (command === 'yarn') { + args.push('remove') + } else { + throw new Error(`Unknown package manager: ${command}`) + } + + await addRegistryToArgs(command, args, cliRegistry) + + args.push(packageName) + + debug(`command: `, command) + debug(`args: `, args) + + await executeCommand(command, args, targetDir) +}