Skip to content

Commit b9acebf

Browse files
authored
refactor(cli): remove package manager commands from local cli (#341)
### TL;DR Simplified CLI command structure by removing package manager related commands. ### What changed? - Removed package manager related commands (`add`, `remove`, `update`, `dedupe`, `outdated`, `why`, `link`, `unlink`, and `pm`) - Added helpful command descriptions to the remaining commands - Simplified the `is_package_manager_command()` function to only check for the `install` command - Updated the help text to reflect the new command structure ### How to test? 1. Run `vite -h` to verify the updated command list 2. Verify that only the core commands are available: `run`, `lint`, `fmt`, `build`, `test`, `lib`, `dev`, `doc`, `cache`, and `install` 3. Check that each command has a descriptive help text ### Why make this change? This change streamlines the CLI interface by focusing on core functionality and removing rarely used package manager commands. This makes the CLI more approachable for new users and reduces maintenance overhead. The simplified command structure aligns better with the primary purpose of the tool while still maintaining the essential `install` command for backward compatibility.
1 parent 7153ea3 commit b9acebf

13 files changed

Lines changed: 39 additions & 2701 deletions

File tree

packages/cli/binding/src/cli.rs

Lines changed: 12 additions & 1950 deletions
Large diffs are not rendered by default.

packages/cli/binding/src/commands/add.rs

Lines changed: 0 additions & 72 deletions
This file was deleted.

packages/cli/binding/src/commands/dedupe.rs

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/cli/binding/src/commands/link.rs

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
pub(crate) mod add;
2-
pub(crate) mod dedupe;
31
pub(crate) mod doc;
42
pub(crate) mod fmt;
53
pub(crate) mod install;
64
pub(crate) mod lib_cmd;
7-
pub(crate) mod link;
85
pub(crate) mod lint;
9-
pub(crate) mod outdated;
10-
pub(crate) mod pm;
11-
pub(crate) mod remove;
126
pub(crate) mod test;
13-
pub(crate) mod unlink;
14-
pub(crate) mod update;
157
pub(crate) mod vite;
16-
pub(crate) mod why;

packages/cli/binding/src/commands/outdated.rs

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)