@modern-js/module-tools-docs 2.54.6 → 2.55.0
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
|
@@ -20,6 +20,7 @@ When we want to write documentation for out module project, we can enable the mo
|
|
|
20
20
|
Use `modern dev` and `modern build --platform` to debug and build your doc site.
|
|
21
21
|
|
|
22
22
|
:::tip
|
|
23
|
+
|
|
23
24
|
After successfully enabling it, you will be prompted to manually add a code similar to the one below to the configuration.
|
|
24
25
|
|
|
25
26
|
```ts
|
|
@@ -31,6 +32,8 @@ export default defineConfig({
|
|
|
31
32
|
});
|
|
32
33
|
```
|
|
33
34
|
|
|
35
|
+
:::
|
|
36
|
+
|
|
34
37
|
## Storybook
|
|
35
38
|
|
|
36
39
|
The **Storybook feature** can be enabled when we want to debug a component or a common module. When this feature is enabled, **the `stories` directory and `.storybook` directory are created in the project directory, and a new `"@modern-js/storybook"` dependency is added to package.json**. Use `storybook dev` and `storybook build` to debug and build.
|
|
@@ -48,6 +51,7 @@ If you want to use Tailwind CSS for a project, you can refer to ["Using Tailwind
|
|
|
48
51
|
Also, the Storybook debugging tool will determine if the project needs to use the Runtime API by checking the project's dependencies and providing the same Runtime API runtime environment as the Modern.js application project.
|
|
49
52
|
|
|
50
53
|
:::tip
|
|
54
|
+
|
|
51
55
|
After successfully enabling it, you will be prompted to manually add a code similar to the one below to the configuration.
|
|
52
56
|
|
|
53
57
|
```ts
|
|
@@ -20,6 +20,7 @@ Modern.js Module 提供了微生成器工具,它可以为当前项目:
|
|
|
20
20
|
使用 `modern dev` 和 `modern build --platform` 来调试和构建你的文档站点。
|
|
21
21
|
|
|
22
22
|
:::tip
|
|
23
|
+
|
|
23
24
|
在成功开启后,会提示需要手动在配置中增加如下类似的代码。
|
|
24
25
|
|
|
25
26
|
```ts
|
|
@@ -31,6 +32,8 @@ export default defineConfig({
|
|
|
31
32
|
});
|
|
32
33
|
```
|
|
33
34
|
|
|
35
|
+
:::
|
|
36
|
+
|
|
34
37
|
## Storybook 调试
|
|
35
38
|
|
|
36
39
|
当我们想要对组件或者普通模块进行调试的时候,可以启用 Storybook 调试功能。启动该功能后,**会在项目目录下创建 `stories` 目录以及 `.storybook` 目录,在 package.json 中新增 `"@modern-js/storybook"` 依赖**。使用 `storybook dev` 和 `storybook build` 来调试和构建。
|
|
@@ -48,6 +51,7 @@ export default defineConfig({
|
|
|
48
51
|
另外,Storybook 调试工具也会通过检测项目的依赖确定项目是否需要使用 Runtime API,并且提供与 Modern.js 应用项目一样的 Runtime API 运行环境。
|
|
49
52
|
|
|
50
53
|
:::tip
|
|
54
|
+
|
|
51
55
|
在成功开启后,会提示需要手动在配置中增加如下类似的代码。
|
|
52
56
|
|
|
53
57
|
```ts
|
package/package.json
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"directory": "packages/document/module-doc"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "2.
|
|
12
|
+
"version": "2.55.0",
|
|
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.18.2",
|
|
18
18
|
"@rspress/shared": "1.18.2",
|
|
19
|
-
"@modern-js/doc-plugin-auto-sidebar": "2.
|
|
19
|
+
"@modern-js/doc-plugin-auto-sidebar": "2.55.0"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"dev": "rspress dev",
|