@modern-js/module-tools-docs 2.48.2 → 2.48.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @modern-js/module-tools-docs
2
2
 
3
+ ## 2.48.3
4
+
5
+ ### Patch Changes
6
+
7
+ - a71d379: docs(module): fix test example
8
+
3
9
  ## 2.48.2
4
10
 
5
11
  ## 2.48.1
@@ -88,11 +88,9 @@ If you need to use the Runtime API, then you can turn it on via [microgenerator]
88
88
  - First is the code of the component:
89
89
 
90
90
  ```tsx title="./src/index.tsx"
91
- export const default () {
92
- return (
93
- <div>This is a UI Component</div>
94
- );
95
- }
91
+ export default () => {
92
+ return <div>This is a UI Component</div>;
93
+ };
96
94
  ```
97
95
 
98
96
 
@@ -104,11 +104,9 @@ npm run test
104
104
  - 首先是组件的代码:
105
105
 
106
106
  ```tsx title="./src/index.tsx"
107
- export const default () {
108
- return (
109
- <div>This is a UI Component</div>
110
- );
111
- }
107
+ export default () => {
108
+ return <div>This is a UI Component</div>;
109
+ };
112
110
  ```
113
111
 
114
112
  - 然后在测试文件中,我们可以按以下方式引用,其中 `@` 指向了源码目录,在初始化项目的 `tests/tsconfig.json` 的 `paths` 中定义了。
package/package.json CHANGED
@@ -9,14 +9,14 @@
9
9
  "directory": "packages/document/module-doc"
10
10
  },
11
11
  "license": "MIT",
12
- "version": "2.48.2",
12
+ "version": "2.48.3",
13
13
  "main": "index.js",
14
14
  "devDependencies": {
15
15
  "react": "^18.2.0",
16
16
  "react-dom": "^18.2.0",
17
17
  "rspress": "1.15.0",
18
18
  "@rspress/shared": "1.15.0",
19
- "@modern-js/doc-plugin-auto-sidebar": "2.48.2"
19
+ "@modern-js/doc-plugin-auto-sidebar": "2.48.3"
20
20
  },
21
21
  "scripts": {
22
22
  "dev": "rspress dev",