@rsdoctor/docs 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
+ import { Badge } from '@theme';
2
+
1
3
  # Options
2
4
 
3
5
  ## RsdoctorRspackPlugin
@@ -137,18 +139,22 @@ import FeaturesRspack from '@en/shared/features-rspack.md';
137
139
 
138
140
  ### mode
139
141
 
142
+ <Badge text="Version: 0.4.0" type="warning" />
143
+
140
144
  - **Type:** `normal | brief | lite`
141
145
  - **Optional:** `true`
142
146
  - **Default:** `normal`
143
147
 
144
148
  Choose the Rsdoctor build report mode to use, which includes the following options:
145
149
 
146
- - normal: Normal mode, which generates a '.rsdoctor' folder in the build output directory. It contains different data files and the report page displays code. The output directory can be configured using [reportDir](#reportdir).
147
- - brief: Brief mode, which generates an HTML report file in the `.rsdoctor` folder of the build output directory. You can open this HTML file in a browser to view the report. Brief mode also has additional configuration options, see [brief](#brief).
148
- - lite: Lite mode, which is a mode based on normal mode that does not display source code and bundles codes. It only displays information about the built codes.
150
+ import ModeIntro from '@en/shared/mode-intro.md';
151
+
152
+ <ModeIntro />
149
153
 
150
154
  ### reportDir
151
155
 
156
+ <Badge text="Version: 0.4.0" type="warning" />
157
+
152
158
  - **Type:** string
153
159
  - **Optional:** `true`
154
160
  - **Default:** undefined
@@ -157,6 +163,8 @@ The output directory for Rsdoctor reports. By default, it is the build output di
157
163
 
158
164
  ### brief
159
165
 
166
+ <Badge text="Version: 0.4.0" type="warning" />
167
+
160
168
  - **Type:** [BriefType](#brieftype)
161
169
  - **Optional:** `true`
162
170
  - **Default:** undefined
@@ -1,3 +1,5 @@
1
+ import { Badge } from '@theme';
2
+
1
3
  # CI/CD Tutorial
2
4
 
3
5
  In CI/CD, there is often a desire to upload historical reports to the CDN as historical records. Because it's not convenient to achieve instant use in the standard mode, the **Brief** mode is supported.
@@ -8,7 +10,9 @@ In Brief mode, data reports are integrated into a single HTML page, making it ea
8
10
 
9
11
  ### Enabling Brief Mode
10
12
 
11
- You can enable Brief mode by configuring the `mode.brief` option in the Rsdoctor plugin. After the build, Brief mode will generate a report in the build output directory: `[outputDir]/.rsdoctor/report-rsdoctor.html`. You can view the build analysis summary by opening the HTML file in a browser.
13
+ <Badge text="Version: 0.4.0" type="warning" />
14
+
15
+ You can enable Brief mode by configuring the [mode.brief](/config/options/options#mode) option in the Rsdoctor plugin. After the build, Brief mode will generate a report in the build output directory: `[outputDir]/.rsdoctor/report-rsdoctor.html`. You can view the build analysis summary by opening the HTML file in a browser.
12
16
 
13
17
  - In Brief mode, no code data is displayed to prevent the page from crashing due to large data sizes.
14
18
  - The report output directory and file name can be configured. Refer to: [Options](/config/options/options#brief).
@@ -28,3 +32,11 @@ module.exports = {
28
32
  ].filter(Boolean),
29
33
  };
30
34
  ```
35
+
36
+ ### Differences between Brief Mode and Lite Mode
37
+
38
+ Currently, Rsdoctor has several report modes: `Normal, Brief, and Lite`.
39
+
40
+ import ModeIntro from '@en/shared/mode-intro.md';
41
+
42
+ <ModeIntro />
@@ -0,0 +1,5 @@
1
+ - **normal mode:** Generates a `.rsdoctor` folder in the build output directory, which contains various data files and displays code in the report page. The output directory can be configured via [reportDir](/config/options/options#reportdir).
2
+
3
+ - **brief mode:** Generates an HTML report file in the `.rsdoctor` folder within the build output directory. All build analysis data will be consolidated into this HTML file, which can be viewed by opening it in a browser. Brief mode also has additional configuration options, detailed at: [brief](/config/options/options#brief).
4
+
5
+ - **lite mode:** Based on the normal mode, this mode does not display source code and product code, only showing the information of the bundled code.
@@ -1,3 +1,5 @@
1
+ import { Badge } from '@theme';
2
+
1
3
  # Options 配置
2
4
 
3
5
  ## RsdoctorRspackPlugin 插件
@@ -139,18 +141,22 @@ import FeaturesRspack from '@zh/shared/features-rspack.md';
139
141
 
140
142
  ### mode
141
143
 
144
+ <Badge text="Version: 0.4.0" type="warning" />
145
+
142
146
  - **Type:** `normal | brief | lite`
143
147
  - **Optional:** `true`
144
148
  - **Default:** `normal`
145
149
 
146
150
  选择使用的 Rsdoctor 构建报告模式,有以下几种:
147
151
 
148
- - normal:普通模式,会在构建产物目录生成 '.rsdoctor' 文件夹,里面会有不同的数据文件,报告页面中会有代码展示。输出目录可配置:[reportDir](#reportdir).
149
- - brief: 简报模式,会在构建产物目录的 '.rsdoctor' 文件夹中生成一个 HTML 报告文件,可通过在浏览器中打开这个 HTML 查看报告.brief 模式还有更多配置项,查看:[brief](#brief)
150
- - lite: 轻量模式,这个模式是在普通模式基础下不展示源码和产物代码的模式,只展示打包后的代码信息。
152
+ import ModeIntro from '@zh/shared/mode-intro.md';
153
+
154
+ <ModeIntro />
151
155
 
152
156
  ### reportDir
153
157
 
158
+ <Badge text="Version: 0.4.0" type="warning" />
159
+
154
160
  - **Type:** string
155
161
  - **Optional:** `true`
156
162
  - **Default:** undefined
@@ -159,6 +165,8 @@ Rsdoctor 报告输出目录,默认是构建产物输出目录。
159
165
 
160
166
  ### brief
161
167
 
168
+ <Badge text="Version: 0.4.0" type="warning" />
169
+
162
170
  - **Type:** [BriefType](#brieftype)
163
171
  - **Optional:** `true`
164
172
  - **Default:** undefined
@@ -1,3 +1,5 @@
1
+ import { Badge } from '@theme';
2
+
1
3
  # CI/CD 使用教程
2
4
 
3
5
  CI/CD 中,往往想要上报历史报告到 CDN 作为历史记录,因为普通模式下无法便捷的做到即开即用,所以支持了 **Brief** 模式。
@@ -8,7 +10,9 @@ Brief 模式中,会将数据报告整合到一个 HTML 页面中,方便用
8
10
 
9
11
  ### 开启 Brief 模式
10
12
 
11
- 通过配置 Rsdoctor 插件的 `mode.brief` 选项,即可开启 Brief 模式。Brief 模式会在构建后生成一份报告到构建产物目录中: `[outputDir]/.rsdoctor/report-rsdoctor.html`,通过浏览器打开 HTML 文件,
13
+ <Badge text="Version: 0.4.0" type="warning" />
14
+
15
+ 通过配置 Rsdoctor 插件的 [mode.brief](/config/options/options#mode) 选项,即可开启 Brief 模式。Brief 模式会在构建后生成一份报告到构建产物目录中: `[outputDir]/.rsdoctor/report-rsdoctor.html`,通过浏览器打开 HTML 文件,
12
16
  即可看到构建分析简报。
13
17
 
14
18
  - Brief 模式下是不展示任何的代码数据的,为了防止数据过大导致页面崩溃。
@@ -30,3 +34,11 @@ module.exports = {
30
34
  ].filter(Boolean),
31
35
  };
32
36
  ```
37
+
38
+ ### Brief 模式和 Lite 模式的区别
39
+
40
+ 目前 Rsdoctor 有几种报告模式:`Normal、Brief 和 Lite`。
41
+
42
+ import ModeIntro from '@zh/shared/mode-intro.md';
43
+
44
+ <ModeIntro />
@@ -0,0 +1,5 @@
1
+ - **normal 模式:** 在构建产物目录中生成一个 `.rsdoctor` 文件夹,其中包含各种数据文件,并在报告页面中展示代码。输出目录可以通过 [reportDir](/config/options/options#reportdir) 进行配置。
2
+
3
+ - **brief 模式:** 在构建产物目录的 `.rsdoctor` 文件夹中生成一个 HTML 报告文件,所有构建分析数据会整合注入到这个 HTML 文件中,可以通过浏览器打开该 HTML 文件查看报告。brief 模式还有更多配置项,详细信息请参阅:[brief](/config/options/options#brief).
4
+
5
+ - **lite 模式:** 基于普通模式,不展示源码和产物代码,仅显示打包后的代码信息。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/docs",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -20,20 +20,20 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^16",
23
- "@types/react": "^18",
23
+ "@types/react": "^18.3.5",
24
24
  "@types/react-dom": "^18",
25
25
  "react": "18.2.0",
26
26
  "react-dom": "18.2.0",
27
- "rsbuild-plugin-google-analytics": "^1.0.1",
28
- "rsbuild-plugin-open-graph": "^1.0.1",
27
+ "rsbuild-plugin-google-analytics": "^1.0.2",
28
+ "rsbuild-plugin-open-graph": "^1.0.2",
29
29
  "rspress-plugin-font-open-sans": "^1.0.0",
30
30
  "typescript": "^5.2.2",
31
- "@rsdoctor/types": "0.4.0"
31
+ "@rsdoctor/types": "0.4.1"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-markdown": "^9.0.1",
35
- "@rstack-dev/doc-ui": "^1.2.0",
36
- "rspress": "^1.26.3"
35
+ "@rstack-dev/doc-ui": "1.4.2",
36
+ "rspress": "^1.28.3"
37
37
  },
38
38
  "scripts": {
39
39
  "dev": "rspress dev",