Skip to content

feat(cli): add doc command for VitePress documentation#172

Merged
fengmk2 merged 2 commits into
mainfrom
09-21-feat_add_vite_doc_command
Sep 22, 2025
Merged

feat(cli): add doc command for VitePress documentation#172
fengmk2 merged 2 commits into
mainfrom
09-21-feat_add_vite_doc_command

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 21, 2025

Copy link
Copy Markdown
Member

TL;DR

Added a new doc command to the CLI for building and serving documentation with VitePress.

What changed?

  • Added a new DocFailed error type to handle documentation command failures
  • Created a new doc.rs module in the vite_task crate to handle documentation tasks
  • Integrated the doc command into the CLI command structure
  • Added TypeScript bindings and resolver for the VitePress documentation tool
  • Updated help text and tests to include the new doc command

How to test?

  1. Run vite doc to start the documentation server in development mode
  2. Run vite doc build to build the documentation for production

Why make this change?

This change adds first-class support for documentation workflows using VitePress, making it easier for users to develop and build documentation for their projects. The implementation follows the same pattern as other commands like test and lib, providing a consistent developer experience across all project tasks.

@fengmk2 fengmk2 linked an issue Sep 21, 2025 that may be closed by this pull request
@fengmk2 fengmk2 changed the title feat: add vite doc command feat(cli): add doc command for VitePress documentation Sep 21, 2025
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch 2 times, most recently from a3031f0 to c0706b3 Compare September 21, 2025 10:13
@fengmk2 fengmk2 self-assigned this Sep 21, 2025
@fengmk2
fengmk2 marked this pull request as ready for review September 21, 2025 10:15
Copilot AI review requested due to automatic review settings September 21, 2025 10:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new doc command to the CLI for building and serving documentation using VitePress, following the established pattern of other CLI commands.

  • Added VitePress integration with TypeScript resolver and Rust command handler
  • Created documentation command infrastructure with build/dev mode support
  • Added test coverage and help message updates for the new doc functionality

Reviewed Changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Reorders dependencies in catalog
packages/cli/src/doc.ts New VitePress resolver implementation
packages/cli/src/bin.ts Integrates doc resolver into CLI binding
packages/cli/package.json Adds VitePress as dependency
packages/cli/binding/src/lib.rs Adds Rust FFI bindings for doc command
crates/vite_task/src/lib.rs Adds doc command to CLI structure and argument parsing
crates/vite_task/src/doc.rs New doc command implementation module
crates/vite_error/src/lib.rs Adds DocFailed error variant
Various test files Updates CLI help text and adds doc command tests
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/cli/src/doc.ts Outdated
Comment thread packages/cli/snap-tests/command-doc/snap.txt Outdated
Comment thread packages/cli/snap-tests/command-doc/snap.txt Outdated
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch from c0706b3 to 6d50162 Compare September 21, 2025 10:20
@Brooooooklyn

Copy link
Copy Markdown
Member

cursor review

@Brooooooklyn

Copy link
Copy Markdown
Member

@codex review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread crates/vite_task/src/doc.rs
Copilot AI review requested due to automatic review settings September 21, 2025 12:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/cli/src/doc.ts Outdated
Comment thread crates/vite_task/src/doc.rs
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch from 13ee90b to 61a1455 Compare September 21, 2025 12:46
@graphite-app

graphite-app Bot commented Sep 21, 2025

Copy link
Copy Markdown

Merge activity

  • Sep 21, 2:56 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Sep 21, 2:56 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Sep 22, 1:24 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.
  • Sep 22, 1:36 AM UTC: @fengmk2 merged this pull request with Graphite.

Copilot AI review requested due to automatic review settings September 21, 2025 14:56
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch from 61a1455 to 903c927 Compare September 21, 2025 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/cli/src/doc.ts Outdated
Comment thread crates/vite_task/src/lib.rs Outdated
Comment thread crates/vite_error/src/lib.rs
@fengmk2
fengmk2 changed the base branch from main to graphite-base/172 September 21, 2025 14:57
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch from 903c927 to 991d11a Compare September 21, 2025 14:57
@fengmk2
fengmk2 changed the base branch from graphite-base/172 to 09-21-fix_cli_add_missing_.npmrc September 21, 2025 14:57
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch 2 times, most recently from 4a12f74 to a6a2966 Compare September 22, 2025 01:13
@fengmk2
fengmk2 force-pushed the 09-21-fix_cli_add_missing_.npmrc branch from 1d6e4b2 to 400129a Compare September 22, 2025 01:13
@fengmk2
fengmk2 changed the base branch from 09-21-fix_cli_add_missing_.npmrc to graphite-base/172 September 22, 2025 01:23
@fengmk2
fengmk2 force-pushed the 09-21-feat_add_vite_doc_command branch from a6a2966 to f7473d0 Compare September 22, 2025 01:23
@graphite-app
graphite-app Bot changed the base branch from graphite-base/172 to main September 22, 2025 01:24
@fengmk2
fengmk2 merged commit 9359bec into main Sep 22, 2025
14 of 17 checks passed
@fengmk2
fengmk2 deleted the 09-21-feat_add_vite_doc_command branch September 22, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add vite doc using vitepress

3 participants