refactor: move CLI code and command modules to vite-plus-cli#241
Merged
branchseer merged 2 commits intomainfrom Oct 22, 2025
Conversation
This was referenced Oct 22, 2025
c30833a to
b67a65e
Compare
- Move all CLI-related code from vite_task to vite-plus-cli: - Args, Commands, CacheSubcommand structs - CliOptions and helper functions - main() entry point and init_tracing() - Move command modules as internal to vite-plus-cli: - doc, fmt, install, lib_cmd, lint, test, vite modules - Keep command-specific configs with their modules - Commands are internal (pub(crate)) since it's a NAPI module - Clean up vite_task to be a pure execution engine: - Export only core types: ResolvedTask, Workspace, ExecutionPlan, etc. - Remove all CLI and command-specific code - Make ResolvedTask methods public for CLI use This creates a clean separation where vite_task is the task execution library and vite-plus-cli handles all CLI concerns and command implementations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
b67a65e to
d783b96
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This refactor moves all CLI-related code from vite_task to vite-plus-cli, creating a cleaner separation between the task execution engine and CLI interface. The vite_task crate is now a pure library focused on task execution, while vite-plus-cli handles all argument parsing, command implementations, and CLI concerns.
- CLI types (Args, Commands, CliOptions) and entry point relocated to vite-plus-cli
- All command implementations (doc, fmt, lint, test, lib, install, vite) moved to internal vite-plus-cli modules
- vite_task simplified to export only core execution types
Reviewed Changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/binding/src/lib.rs | Updates imports to use moved CLI types from local modules |
| packages/cli/binding/src/cli.rs | New file containing all CLI logic moved from vite_task |
| packages/cli/binding/src/commands/*.rs | Command modules moved from vite_task with updated imports |
| packages/cli/binding/src/commands/mod.rs | Module declarations for command modules |
| packages/cli/binding/Cargo.toml | Added dependencies previously in vite_task |
| crates/vite_task/src/lib.rs | Simplified to export only core execution types |
| crates/vite_task/src/types.rs | New file containing ResolveCommandResult type |
| crates/vite_task/src/main.rs | Removed binary entry point |
| crates/vite_task/src/config/*.rs | Made methods public for CLI usage |
| crates/vite_task/Cargo.toml | Removed binary configuration |
| .github/workflows/ci.yml | Updated to use new CLI bootstrap approach |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fengmk2
reviewed
Oct 22, 2025
fengmk2
approved these changes
Oct 22, 2025
Member
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Move all CLI-related code from vite_task to vite-plus-cli:
Move command modules as internal to vite-plus-cli:
Clean up vite_task to be a pure execution engine:
This creates a clean separation where vite_task is the task execution
library and vite-plus-cli handles all CLI concerns and command implementations.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com