Skip to content

Commit e902ea2

Browse files
committed
chore: suggestion fix
1 parent 6aea6ea commit e902ea2

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

website/docs/en/guide/advanced/module-federation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { PackageManagerTabs } from '@theme';
2828

2929
<PackageManagerTabs command="add @module-federation/rsbuild-plugin -D" />
3030

31-
Then register the plugin to the `rslib.config.ts` file:
31+
Then register the plugin in the `rslib.config.ts` file:
3232

3333
```ts title='rslib.config.ts' {8-43}
3434
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
@@ -94,7 +94,7 @@ However, if you want this Rslib Module to consume other producers at the same ti
9494

9595
Rslib support developing Module Federation Rslib project with a host application.
9696

97-
#### 1. Start MF `dev` of library
97+
#### 1. Start MF `dev` command of library
9898

9999
Adding the `dev` command to the `package.json` file:
100100

website/docs/en/guide/solution/nodejs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default defineConfig({
5454

5555
Rslib set [target](/config/rsbuild/output#outputtarget) to `"node"` by default, which is different from the default target of Rsbuild.
5656

57-
When target is valued as `"node"`, Rslib adjusts many configurations for Node.js. For example, [output.externals](/config/rsbuild/output#outputtarget) will exclude built-in Node.js modules, and [shims](/config/lib/shims) will add a shim for `import.meta.url` in CJS output by default.
57+
When target is set to `"node"`, Rslib adjusts many configurations for Node.js. For example, [output.externals](/config/rsbuild/output#outputtarget) will exclude built-in Node.js modules, and [shims](/config/lib/shims) will add a shim for `import.meta.url` in CJS output by default.
5858

5959
### Externals
6060

website/docs/en/guide/solution/react.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default defineConfig({
7979
- **Type**: `string`
8080
- **Default**: `'react'`
8181

82-
When `runtime` is valued as `'automatic'`, you can specify the import path of the JSX transform through `importSource`.
82+
When `runtime` is set to `'automatic'`, you can specify the import path of the JSX transform through `importSource`.
8383

8484
For example, when using [Emotion](https://emotion.sh/), you can set `importSource` to `'@emotion/react'`:
8585

website/docs/zh/guide/advanced/dts.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ TypeScript 声明文件 (DTS) 提供 JavaScript 代码的类型信息。 DTS 文
99
1. **类型检查**: 为 JavaScript 代码提供类型信息,帮助开发人员在编译时捕获潜在的类型错误。
1010
2. **代码补全**: 增强代码编辑器功能,例如自动完成和代码导航。
1111
3. **文档生成**: 生成 JavaScript 代码文档,提供更好的开发体验。
12-
4. **IDE 支持**: 改善 Visual Studio Code、WebStorm 等 IDE 中的开发人员体验.
12+
4. **IDE 支持**: 改善 Visual Studio Code、WebStorm 等 IDE 中的开发者体验。
1313
5. **库消费**: 让其他使用者更容易使用和理解该库。
1414

1515
## 什么是 Bundle DTS 和 Bundleless DTS
1616

1717
### Bundle DTS
1818

19-
Bundle DTS 涉及将多个 TypeScript 声明文件 bundle 到一个声明文件中。
19+
Bundle DTS 将多个 TypeScript 声明文件 bundle 到一个声明文件中。
2020

2121
- **优势:**
2222

2323
- **简化管理**: 简化类型文件的管理和引用。
2424
- **容易分发**: 减少用户使用库时需要处理的文件数量。
2525

2626
- **劣势:**
27-
- **生成复杂**: 在大型项目中,生成和维护单个 bundle 文件可能会变得复杂.
27+
- **生成复杂**: 在大型项目中,生成和维护单个 bundle 文件可能会变得复杂
2828
- **调试困难**: 调试类型问题可能不像各个文件单独输出那样直观。
2929

3030
### Bundleless DTS
3131

32-
Bundleless DTS 涉及为库中的每个模块生成单独的声明文件,就像 `tsc` 一样。
32+
Bundleless DTS 为库中的每个模块生成单独的声明文件,就像 `tsc` 一样。
3333

3434
- **优势:**
3535

@@ -40,7 +40,7 @@ Bundleless DTS 涉及为库中的每个模块生成单独的声明文件,就
4040
- **多文件**: 用户在使用该库时可能需要处理多个声明文件。
4141
- **管理复杂**: 可能需要额外的配置才能正确引用所有文件。
4242

43-
## 怎么在 Rslib 中生成 DTS
43+
## 如何在 Rslib 中生成 DTS
4444

4545
Rslib 默认使用 [TypeScript Compiler API](https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API) 生成 Bundleless DTS, [API Extractor](https://api-extractor.com/)
4646

@@ -50,13 +50,13 @@ Rslib 默认使用 [TypeScript Compiler API](https://github.com/microsoft/TypeSc
5050

5151
如果你想生成 Bundle DTS,可以:
5252

53-
1. 安装 `@microsoft/api-extractor` 作为 `dev`, 这是用于 bundle DTS 文件的底层工具。
53+
1. 安装 `@microsoft/api-extractor` 作为 `devDependencies`, 这是用于 bundle DTS 文件的底层工具。
5454

5555
import { PackageManagerTabs } from '@theme';
5656

5757
<PackageManagerTabs command="add @microsoft/api-extractor -D" />
5858

59-
2. 设置 `dts: { bundle: true }` 在 Rslib 配置文件中
59+
2. 在 Rslib 配置文件中设置 `dts: { bundle: true }`
6060

6161
::: tip
6262

website/docs/zh/guide/advanced/module-federation.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Tab, Tabs } from 'rspress/theme';
1313
- 不同的团队处理同一应用程序的不同部分,而无需重新编译整个应用程序。
1414
- 运行时中在应用间动态加载和共享代码。
1515

16-
模块联盟可以帮助你:
16+
模块联邦可以帮助你:
1717

1818
- 减少代码重复
1919
- 提高代码可维护性
@@ -28,7 +28,7 @@ import { PackageManagerTabs } from '@theme';
2828

2929
<PackageManagerTabs command="add @module-federation/rsbuild-plugin -D" />
3030

31-
然后在 `rslib.config.ts` 注册插件:
31+
然后在 `rslib.config.ts` 中注册插件:
3232

3333
```ts title='rslib.config.ts' {8-43}
3434
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
@@ -94,7 +94,7 @@ export default defineConfig({
9494

9595
Rslib 支持宿主应用和 Rslib 模块联邦项目同时开发。
9696

97-
#### 1. 启动库中的 MF `dev`
97+
#### 1. 启动库中的 MF `dev` 命令
9898

9999
添加 `dev` 命令在 `package.json` 文件:
100100

@@ -106,14 +106,14 @@ Rslib 支持宿主应用和 Rslib 模块联邦项目同时开发。
106106
}
107107
```
108108

109-
然后运行 `dev` 命令即可启动模块联邦开发模式,可被 Host App 消费
109+
然后运行 `dev` 命令即可启动模块联邦开发模式,可被宿主应用消费
110110
同时具有热模块更换(HMR)功能。
111111

112112
<PackageManagerTabs command="run dev" />
113113

114-
#### 2. 启动 Host App
114+
#### 2. 启动宿主应用
115115

116-
设置 Host 消费 Rslib 的模块联邦库。查看[@module-federation/rsbuild-plugin
116+
设置宿主应用消费 Rslib 的模块联邦库。查看[@module-federation/rsbuild-plugin
117117
](https://www.npmjs.com/package/@module-federation/rsbuild-plugin) 获取更多信息。
118118

119119
```ts title="rsbuild.config.ts" {8-24}
@@ -145,7 +145,7 @@ export default defineConfig({
145145
});
146146
```
147147

148-
然后通过 `rsbuild dev` 启动 Host app
148+
然后通过 `rsbuild dev` 启动宿主应用
149149

150150
### 使用 Storybook
151151

website/docs/zh/guide/start/glossary.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ CJS 代表 [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modul
1919

2020
## Bundleless
2121

22-
Bundleless 是指一种开发方法,它避免了将多个 JavaScript /TypeScript 文件捆绑到单个或更少的输出文件中,然后再将其提供给客户端的传统做法。相反,它的目标是直接为各个模块提供服务。
22+
Bundleless 是指一种开发模式,它避免了将多个 JavaScript/TypeScript 文件 bundle 到单个或很少的输出文件中,然后再将其提供给客户端的传统做法。相反,它的目标是直接为各个模块提供服务。
2323

2424
## DTS
2525

26-
DTS代表[TypeScript声明文件](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)为JavaScript代码提供类型信息
26+
DTS代表 [TypeScript 声明文件](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)为 JavaScript 代码提供类型信息
2727

2828
## 模块联邦
2929

3030
<MF />
3131

3232
## 更多
3333

34-
访问 [Rsbuild-术语表](https://rsbuild.dev/guide/start/glossary)[Rspack-术语表](https://rspack.dev/misc/glossary) 中的更多名词解释。
34+
访问 [Rsbuild - 名词解释](https://rsbuild.dev/zh/guide/start/glossary)[Rspack - 术语表](https://rspack.dev/zh/misc/glossary) 中的更多名词解释。

website/docs/zh/guide/start/npm-packages.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Rslib 核心包,提供 CLI 命令和基于 Rsbuild 的构建功能。
1515

1616
![](https://img.shields.io/npm/v/rsbuild-plugin-dts?style=flat-square&colorA=564341&colorB=F8F5FF)
1717

18-
支持为 TypeScript 发出声明文件的 Rsbuild 插件。
18+
支持为 TypeScript 生成类型声明文件的 Rsbuild 插件。
1919

2020
- [npm](https://npmjs.com/package/rsbuild-plugin-dts)
2121
- [Source Code](https://github.com/web-infra-dev/rslib/tree/main/packages/plugin-dts)

website/docs/zh/guide/start/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import { PackageManagerTabs } from '@theme';
5151
每个模板都支持 JavaScript 和 TypeScript,以及可选的开发工具、格式化程序和 linter。
5252

5353
:::info
54-
我们正在努力为更多框架提供模板 (比如 Vue).
54+
我们正在努力为更多框架提供模板 (比如 Vue)
5555
:::
5656

5757
### 开发工具

0 commit comments

Comments
 (0)