Skip to content

Conversation

@EmilyyyLiu
Copy link
Contributor

@EmilyyyLiu EmilyyyLiu commented Sep 16, 2025

修改 docs:deploy 命令执行路径为dist
增加dist 文件到.gitignore

Summary by CodeRabbit

  • Chores
    • 将构建产物目录加入忽略列表,避免将生成文件提交到版本库,提升仓库整洁度与协作效率。
    • 调整文档发布脚本,改为基于构建产物目录进行发布,确保文档站点使用最新打包结果,简化并稳定部署流程。

@vercel
Copy link

vercel bot commented Sep 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rate Ready Ready Preview Comment Sep 16, 2025 3:02am

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

将构建产物目录 dist 新增到 .gitignore;在 package.json 中把 docs:deploy 脚本的发布目录从 .doc 改为 dist。无其他变更。

Changes

Cohort / File(s) Change Summary
Git 忽略配置
\.gitignore
新增忽略项:dist
脚本与发布目录
package.json
docs:deploy 脚本由 gh-pages -d .doc 改为 gh-pages -d dist

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant NPM as npm scripts
    participant GH as gh-pages CLI
    participant Pages as GitHub Pages

    Dev->>NPM: run docs:deploy
    NPM->>GH: gh-pages -d dist
    GH->>Pages: Publish contents of dist branch/dir
    Note right of Pages: 站点内容来自 dist

    Note over Dev,GH: .gitignore 新增 dist(仅影响版本控制)
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

我把胡萝卜当锚点,蹦到仓库前,
把 dist 藏进草丛里,Git 不再盘点。
按下部署的跳跳键,gh-pages轻轻转,
文档从 dist 起飞,月光把路照亮。
(\\ )/🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 标题 “chore: change deploy path” 简短且直接对应 PR 的主要改动:将 docs:deploy 的发布路径改为 dist 并把 dist 加入 .gitignore,使用 chore 前缀表明这是例行性配置调整,能让审阅者快速识别主要意图且无冗余信息。
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @EmilyyyLiu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在优化文档部署流程。它通过将 docs:deploy 命令的部署路径从旧的 .doc 目录更新为新的 dist 目录来实现这一目标。同时,为了保持仓库的整洁并避免提交生成的文件,dist 目录也被添加到了 .gitignore 中。这些更改共同简化了文档的发布工作流。

Highlights

  • 部署路径变更: 将 docs:deploy 命令的部署源目录从 .doc 更改为 dist
  • Git 忽略文件更新: 在 .gitignore 文件中添加了 dist 目录,以确保构建输出文件不会被版本控制系统跟踪。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 修改了文档的部署路径,将 docs:deploy 命令的目标目录从 .doc 改为 dist,并相应地将 dist 目录添加到了 .gitignore 中。这些改动是正确的,使项目配置与 dumi 的默认行为保持一致。

我只在 .gitignore 文件中发现了一个可以改进的小地方,建议为目录条目添加斜杠以提高清晰度。总体来说,这是一个不错的清理和标准化改动。

package-lock.json
.doc/

dist
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

建议为目录条目添加斜杠后缀,以明确表示它是一个目录,并避免意外忽略同名文件。1

另外,此文件中的 .doc/ (第 29 行) 和 .doc (第 31 行) 是重复的。由于 docs:deploy 命令已不再使用 .doc 目录,可以考虑在另一个提交中将这两行都删除,以保持文件整洁。

dist/

Style Guide References

Footnotes

  1. 在 .gitignore 文件中,为匹配目录的模式添加末尾斜杠 (trailing slash) 是一个最佳实践。这能使模式的意图更加明确,避免错误地匹配到同名文件。

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.95%. Comparing base (23ebec0) to head (d4215cc).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #200   +/-   ##
=======================================
  Coverage   96.95%   96.95%           
=======================================
  Files           4        4           
  Lines         164      164           
  Branches       54       54           
=======================================
  Hits          159      159           
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.gitignore (1)

30-30: 忽略 dist 没问题;建议使用目录形式以与现有规则更一致。

当前文件中既有 build/lib/es(无斜杠)也有 .doc/(带斜杠)。为清晰起见,推荐改为目录形式:

-dist
+dist/

可选:同时清理 .doc/.doc 的重复规则,统一成一种风格,减少维护成本。

package.json (1)

31-31: 确认 dumi 输出目录并建议在部署脚本中加入构建

dumi 2.x 默认输出目录为 dist;可在 .dumi.ts / .umirc.ts 等配置中用 outputPath 自定义。若项目未自定义 outputPath,则将 docs:deploy 指向 dist 合理。建议改为:

-    "docs:deploy": "gh-pages -d dist",
+    "docs:deploy": "dumi build && gh-pages -d dist",
-    "postpublish": "npm run docs:build && npm run docs:deploy",
+    "postpublish": "npm run docs:deploy",

若仍希望职责分离,请在 CI 中确保先执行 docs:build 再 docs:deploy,以避免 dist 缺失导致发布失败。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23ebec0 and d4215cc.

📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Socket Security: Pull Request Alerts

@zombieJ zombieJ merged commit 3a70945 into react-component:master Sep 16, 2025
9 checks passed
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.

2 participants