-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update start react md #3071
docs: update start react md #3071
Conversation
Walkthrough本次更改对 NutUI React 文档进行了细节调整,包括英文文档中章节标题的重构与描述的优化(如将 “Install via NPM” 改为 “Install via npm”,将 “Manual On-Demand Loading” 重命名为 “Component Usage”),以及对 Tree Shaking 说明和使用方式的结构性调整。同时,中文文档中对自动按需加载时全局类文件导入的要求进行了加粗处理,整体提升了文档的可读性和一致性。 Changes
Possibly related PRs
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #3071 +/- ##
==========================================
Coverage 86.10% 86.10%
==========================================
Files 277 277
Lines 18406 18406
Branches 2807 2808 +1
==========================================
Hits 15849 15849
Misses 2552 2552
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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 (5)
src/sites/sites-react/doc/docs/react/start-react.en-US.md (4)
9-10
: 标题级别调整建议。
当前标题“#### 1. Install via npm”的层级不符合逐级递增原则,建议将其修改为“### 1. Install via npm”,以满足 markdownlint 的要求。🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
9-9: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4(MD001, heading-increment)
24-25
: 标题层级建议调整。
建议将 “#### Method 1: Regular Usage - Full Import of Styles” 修改为 “### Method 1: Regular Usage - Full Import of Styles”,以保证标题层级的连续性。🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
24-24: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4(MD001, heading-increment)
44-46
: 标题层级建议调整。
建议将 “#### Method 2: Manual On-Demand Loading” 修改为 “### Method 2: Manual On-Demand Loading”,确保文档中标题的层级由上至下依次递增。
59-61
: 标题层级及说明调整建议。
建议将 “#### Method 3: Automatic On-Demand Loading” 修改为 “### Method 3: Automatic On-Demand Loading”。同时,自动加载部分已经明确提醒需引入全局文件,文案变化总体良好。src/sites/sites-react/doc/docs/react/start-react.md (1)
61-62
: 注意文案修正。
在描述自动按需加载时的说明中,“扔需引入 global 类的文件”中的“扔需”似乎存在笔误,建议修改为“仍需”,以确保语义准确。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/sites/sites-react/doc/docs/react/start-react.en-US.md
(4 hunks)src/sites/sites-react/doc/docs/react/start-react.md
(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
src/sites/sites-react/doc/docs/react/start-react.en-US.md
9-9: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4
(MD001, heading-increment)
24-24: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4
(MD001, heading-increment)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test
- GitHub Check: build
🔇 Additional comments (11)
src/sites/sites-react/doc/docs/react/start-react.en-US.md (11)
5-6
: 文案表达改进清晰。
更新后的描述明确说明了如何安装和使用 NutUI React,有助于新用户快速上手。请确保术语在全文中保持一致。
11-18
: 安装命令部分无问题。
示例中列出的 pnpm、yarn 及 npm 的安装命令都非常清晰,能帮助用户快速上手。
20-22
: 组件使用说明优化。
“## Component Usage” 部分的说明清晰,详细阐述了 Tree Shaking 的默认支持及其局限性。请注意后续各部分标题层级的统一,以保持文档风格一致。
48-51
: 手动按需加载示例清晰。
此代码示例展示了如何单独引入组件及其样式,路径和说明均较为明确,建议保持当前状态。
53-57
: 全局文件引入说明明确。
提示用户在手动按需加载时必须引入全局类文件,以加载 NutUI React 部分全局逻辑和样式,说明清楚且具有指导性。
63-67
: vite 配置说明清晰。
对如何安装并配置 vite-plugin-imp 插件的描述清楚明了,能够引导用户正确集成到项目中。
68-107
: vite 配置代码示例准确。
代码示例完整展示了在 vite 环境下的插件配置,结构清晰。建议定期检查插件文档,确保示例与最新配置保持一致。
109-113
: webpack 配置说明到位。
文档详细描述了如何安装及配置 babel-plugin-import 插件,有助于用户在 webpack 环境下快速集成。
127-146
: babel 配置示例良好。
配置示例正确展示了如何自定义导入路径,并设置 camel2DashComponentName。建议保持示例与实际项目一致,并及时跟进插件更新。
151-153
: 使用注意事项说明明确。
通过列表形式清楚地列出了 NutUI React 的依赖和样式单位等注意事项,内容简洁准确。
156-158
: 模板部分说明优化。
示例代码部分重命名为 “Templates”,符合文档整体风格,请确认链接路径与项目目录保持同步。
Summary by CodeRabbit