Skip to content

Commit 66c04d0

Browse files
committed
docs: refine homepage command descriptions
1 parent b9cd500 commit 66c04d0

3 files changed

Lines changed: 56 additions & 56 deletions

File tree

website/i18n.json

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -32,120 +32,120 @@
3232
"zh": "从开发到构建,快人一步"
3333
},
3434
"appCommandDesc": {
35-
"en": "Start a dev server in an instant and build your app for production. Powered by Rsbuild, with the speed of Rspack at every step.",
36-
"zh": "快速启动开发服务器,轻松构建生产应用。基于 Rsbuild,让 Rspack 的速度贯穿整个开发流程。"
35+
"en": "Powered by Rspack and Rsbuild, start a dev server quickly and build enterprise-grade web applications",
36+
"zh": "基于 Rspack 和 Rsbuild,快速启动开发服务器,构建企业级 Web 应用"
3737
},
3838
"appCommandHmr": {
39-
"en": "Fast feedback with hot module replacement",
40-
"zh": "热模块替换(HMR),即时反馈代码变更"
39+
"en": "Build 5–20× faster than webpack",
40+
"zh": "构建速度比 webpack 快 5–20 倍"
4141
},
4242
"appCommandProduction": {
43-
"en": "Optimized production builds powered by Rspack",
44-
"zh": "由 Rspack 驱动,生成优化的生产产物"
43+
"en": "Built-in production optimizations for leaner bundles",
44+
"zh": "内置多项生产优化能力,生成精简的产物"
4545
},
4646
"appCommandConfig": {
47-
"en": "One app configuration for development and builds",
48-
"zh": "开发与构建,共用一份应用配置"
47+
"en": "A consistent bundling process for development and production",
48+
"zh": "开发与生产采用一致的打包流程"
4949
},
5050
"libCommandTitle": {
5151
"en": "Your library, ready to ship",
5252
"zh": "构建你的库,轻松交付"
5353
},
5454
"libCommandDesc": {
55-
"en": "Build JavaScript and TypeScript libraries with Rslib. From reusable utilities to component libraries, bring your code to more projects.",
56-
"zh": "使用 Rslib 构建 JavaScript 和 TypeScript 库。从通用工具到组件库,让你的代码在更多项目中复用。"
55+
"en": "Build reusable JavaScript libraries with Rslib, with the flexibility to develop shared libraries, CLI tools, and components",
56+
"zh": "使用 Rslib 构建可复用的 JavaScript 库,灵活应对公共库、命令行和组件开发需求"
5757
},
5858
"libCommandFormats": {
59-
"en": "Flexible output formats, including ESM and CommonJS",
60-
"zh": "灵活的产物格式,支持 ESM 和 CommonJS"
59+
"en": "One configuration for ESM, CJS, Module Federation, and more",
60+
"zh": "一份配置,输出 ESM、CJS 和模块联邦等多种格式"
6161
},
62-
"libCommandTypes": {
63-
"en": "Generate TypeScript declarations with --dts",
64-
"zh": "通过 --dts 生成 TypeScript 类型声明"
62+
"libCommandModes": {
63+
"en": "Choose bundle or bundleless output to suit your needs",
64+
"zh": "按需选择 bundle 或 bundleless 输出模式"
6565
},
66-
"libCommandWatch": {
67-
"en": "Rebuild on every change with --watch",
68-
"zh": "通过 --watch 监听变更,自动重新构建"
66+
"libCommandTypes": {
67+
"en": "Generate type declarations quickly with TypeScript 7",
68+
"zh": "使用 TypeScript 7 快速生成类型声明"
6969
},
7070
"testCommandTitle": {
71-
"en": "Test as fast as you build",
72-
"zh": "测试与开发,同样高效"
71+
"en": "Faster tests, instant feedback",
72+
"zh": "更快测试,即时反馈"
7373
},
7474
"testCommandDesc": {
75-
"en": "Run your tests with Rstest and keep feedback close to your code. Share your build settings and move from local development to CI with ease.",
76-
"zh": "使用 Rstest 运行测试,及时获得代码反馈。复用构建配置,让测试从本地开发顺畅延伸到 CI"
75+
"en": "Test JavaScript with Rstest for fast feedback from local development to CI",
76+
"zh": "使用 Rstest 测试 JavaScript 代码,从本地开发到 CI 保持高效反馈"
7777
},
7878
"testCommandConfig": {
79-
"en": "Automatically inherit app or library configuration",
80-
"zh": "自动继承应用或库的配置"
79+
"en": "Automatically reuse existing build configuration to reduce maintenance",
80+
"zh": "自动复用已有构建配置,减少维护成本"
8181
},
82-
"testCommandWatch": {
83-
"en": "Rerun related tests as your code changes",
84-
"zh": "代码变更时,自动重新运行相关测试"
82+
"testCommandApi": {
83+
"en": "Familiar Jest APIs",
84+
"zh": "熟悉的 Jest API"
8585
},
86-
"testCommandCoverage": {
87-
"en": "Collect coverage locally or run once in CI",
88-
"zh": "支持覆盖率收集和适用于 CI 的单次运行"
86+
"testCommandPerformance": {
87+
"en": "Rspack-powered tests, over 20% faster than Jest",
88+
"zh": "由 Rspack 加速测试,比 Jest 快 20% 以上"
8989
},
9090
"checkCommandTitle": {
9191
"en": "Consistent code. One command",
9292
"zh": "一个命令,保持代码一致"
9393
},
9494
"checkCommandDesc": {
95-
"en": "Run lint and formatting checks together, with optional TypeScript type checking. Keep your existing code style with support for Prettier options and plugins.",
96-
"zh": "一次完成代码检查与格式校验,按需启用 TypeScript 类型检查。兼容 Prettier 的格式化选项与插件,延续现有代码风格。"
95+
"en": "Unify linting and formatting checks while keeping your Prettier options and plugins",
96+
"zh": "统一运行代码检查与格式校验,兼容 Prettier 选项与插件,延续团队代码规范"
9797
},
9898
"checkCommandTypes": {
99-
"en": "Type-aware linting, with optional type checking",
100-
"zh": "支持类型感知的代码检查,按需启用类型检查"
99+
"en": "Type-aware linting with optional TypeScript type checking",
100+
"zh": "支持类型感知规则,按需启用 TypeScript 类型检查"
101101
},
102102
"checkCommandFormat": {
103-
"en": "Parallel formatting with a persistent cache",
104-
"zh": "并行格式化与持久化缓存,加速重复运行"
103+
"en": "Parallel formatting and persistent caching for faster repeat runs",
104+
"zh": "并行格式化与持久化缓存,加速重复检查"
105105
},
106106
"checkCommandFix": {
107-
"en": "Apply lint and formatting fixes with rs check --fix",
108-
"zh": "通过 rs check --fix 自动修复代码与格式问题"
107+
"en": "Fix lint and formatting issues with --fix",
108+
"zh": "通过 --fix 自动修复代码与格式问题"
109109
},
110110
"hooksCommandTitle": {
111111
"en": "Better code in every commit",
112112
"zh": "让每次提交,都经过检查"
113113
},
114114
"hooksCommandDesc": {
115-
"en": "Automatically check and format staged files before committing. Reuse lint-staged task configuration and migrate your existing Git Hooks workflow from Husky.",
116-
"zh": "在提交前自动检查和格式化暂存文件。支持 lint-staged 的任务配置,可从 Husky 迁移现有 Git Hooks 工作流。"
115+
"en": "Bring checks into your commit workflow, reuse lint-staged task configuration, and migrate existing Husky hooks",
116+
"zh": "将代码检查融入提交流程,兼容 lint-staged 任务配置,支持迁移现有 Husky hooks"
117117
},
118118
"hooksCommandSetup": {
119-
"en": "Manage Git hooks for the whole repository",
120-
"zh": "统一管理整个仓库的 Git Hooks"
119+
"en": "Manage repository-wide Git hooks in one place",
120+
"zh": "统一管理仓库级 Git hooks"
121121
},
122122
"hooksCommandStaged": {
123-
"en": "Run checks on staged files before committing",
124-
"zh": "提交前,针对暂存文件运行检查"
123+
"en": "Check and format staged files before each commit",
124+
"zh": "仅检查和格式化暂存文件,聚焦本次提交"
125125
},
126126
"hooksCommandTasks": {
127-
"en": "Configure lint, format, and custom tasks by file pattern",
128-
"zh": "按文件模式配置检查、格式化及自定义任务"
127+
"en": "Match files with glob patterns and run custom tasks",
128+
"zh": "按文件模式匹配任务,灵活运行自定义命令"
129129
},
130130
"docCommandTitle": {
131131
"en": "Great docs, built right in",
132132
"zh": "让文档,融入开发流程"
133133
},
134134
"docCommandDesc": {
135-
"en": "Turn your content into a documentation site with Rspress. Keep your docs alongside your code, with one configuration for the whole workflow.",
136-
"zh": "使用 Rspress 将内容构建为文档站点。让文档与代码一同维护,通过统一配置串联完整工作流。"
135+
"en": "Build documentation sites with Rspress and maintain docs alongside your code",
136+
"zh": "使用 Rspress 构建文档站点,让项目文档与代码一同开发和维护"
137137
},
138138
"docCommandMarkdown": {
139-
"en": "Write in Markdown and add React components with MDX",
140-
"zh": "使用 Markdown 编写文档,通过 MDX 嵌入 React 组件"
139+
"en": "Write Markdown and embed React components with MDX",
140+
"zh": "支持 Markdown MDX,灵活嵌入 React 组件"
141141
},
142142
"docCommandFeatures": {
143143
"en": "Built-in search and multilingual documentation",
144144
"zh": "内置全文搜索,支持多语言文档"
145145
},
146146
"docCommandWorkflow": {
147-
"en": "Develop, build, and preview with one CLI",
148-
"zh": "通过统一命令行完成开发、构建与预览"
147+
"en": "One CLI for development, production builds, and local previews",
148+
"zh": "统一完成文档开发、生产构建与本地预览"
149149
},
150150
"guide": {
151151
"en": "Guide",

website/theme/components/Commands.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
.description {
7575
margin: 1.25rem 0 0;
7676
color: var(--command-text);
77-
font-size: 1rem;
77+
font-size: 0.925rem;
7878
line-height: 1.75;
7979
}
8080

website/theme/components/Commands.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ export function Commands() {
161161
<p className={styles.description}>{t('libCommandDesc')}</p>
162162
<ul className={styles.highlights}>
163163
<li>{t('libCommandFormats')}</li>
164+
<li>{t('libCommandModes')}</li>
164165
<li>{t('libCommandTypes')}</li>
165-
<li>{t('libCommandWatch')}</li>
166166
</ul>
167167
</div>
168168
<Terminal>
@@ -192,9 +192,9 @@ export function Commands() {
192192
<h2 id="commands-test-title">{t('testCommandTitle')}</h2>
193193
<p className={styles.description}>{t('testCommandDesc')}</p>
194194
<ul className={styles.highlights}>
195+
<li>{t('testCommandApi')}</li>
196+
<li>{t('testCommandPerformance')}</li>
195197
<li>{t('testCommandConfig')}</li>
196-
<li>{t('testCommandWatch')}</li>
197-
<li>{t('testCommandCoverage')}</li>
198198
</ul>
199199
</div>
200200
<Terminal>

0 commit comments

Comments
 (0)