@@ -118,12 +118,14 @@ Examples:
|
||||
${getPackageCommandUsage("remove")}
|
||||
|
||||
Remove a package and its source from settings.
|
||||
Alias: ${APP_NAME} uninstall <source> [-l]
|
||||
|
||||
Options:
|
||||
-l, --local Remove from project settings (.pi/settings.json)
|
||||
|
||||
Example:
|
||||
Examples:
|
||||
${APP_NAME} remove npm:@foo/bar
|
||||
${APP_NAME} uninstall npm:@foo/bar
|
||||
`);
|
||||
return;
|
||||
|
||||
@@ -147,8 +149,14 @@ List installed packages from user and project settings.
|
||||
}
|
||||
|
||||
function parsePackageCommand(args: string[]): PackageCommandOptions | undefined {
|
||||
const [command, ...rest] = args;
|
||||
if (command !== "install" && command !== "remove" && command !== "update" && command !== "list") {
|
||||
const [rawCommand, ...rest] = args;
|
||||
let command: PackageCommand | undefined;
|
||||
if (rawCommand === "uninstall") {
|
||||
command = "remove";
|
||||
} else if (rawCommand === "install" || rawCommand === "remove" || rawCommand === "update" || rawCommand === "list") {
|
||||
command = rawCommand;
|
||||
}
|
||||
if (!command) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user