Skip to content

Commit 3a51df4

Browse files
authored
Merge pull request #1635 from inversify/chore/update-react-code-runner-to-use-inversify-8
Update inversify code runner to v8
2 parents 0af2675 + 3720ad5 commit 3a51df4

File tree

13 files changed

+14
-34
lines changed

13 files changed

+14
-34
lines changed

packages/docs/services/inversify-site/docs/internals/planning.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Each binding node contains:
100100

101101
## Visualizing Plan Trees
102102

103-
Use the interactive code editor below to experiment with different binding configurations and see the generated plan trees. The editor allows you to write InversifyJS code and visualizes the resulting plan structure, helping you understand how the container resolves your dependencies.
103+
Use the interactive code editor below to experiment with different binding configurations. Write your InversifyJS code in the **Editor** tab and press **Run** to execute it, then switch to the **Graph** tab to see the generated dependency plan tree visualized as an interactive diagram.
104104

105105
<DocusaurusInversifyCodeEditor style={{ height: 500 }} />
106106

packages/docs/services/inversify-site/docs/introduction/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import gettingStartedSource from '@inversifyjs/code-examples/generated/examples/
1010
Start by installing `inversify` and `reflect-metadata`:
1111

1212
```bash
13-
npm install inversify@beta reflect-metadata
13+
npm install inversify reflect-metadata
1414
```
1515

1616
Next, initialize your first container and add some bindings:

packages/docs/services/inversify-site/i18n/zh/docusaurus-plugin-content-docs/current/internals/planning.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ interface PlanResult {
100100

101101
## 可视化规划树
102102

103-
使用下面的交互式代码编辑器尝试不同的绑定配置并查看生成的规划树。编辑器允许你编写 InversifyJS 代码并可视化生成的规划结构,帮助你了解容器如何解析你的依赖项
103+
使用下面的交互式代码编辑器尝试不同的绑定配置。在 **Editor** 标签页中编写 InversifyJS 代码,点击 **Run** 按钮执行,然后切换到 **Graph** 标签页查看以交互式图表形式呈现的依赖关系规划树
104104

105105
<DocusaurusInversifyCodeEditor style={{ height: 500 }} />
106106

packages/docs/services/inversify-site/i18n/zh/docusaurus-plugin-content-docs/current/introduction/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import gettingStartedSource from '@inversifyjs/code-examples/generated/examples/
1010
首先安装 `inversify``reflect-metadata`
1111

1212
```bash
13-
npm install inversify@beta reflect-metadata
13+
npm install inversify reflect-metadata
1414
```
1515

1616
接下来,初始化你的第一个容器并添加一些绑定:

packages/docs/services/inversify-site/i18n/zh/docusaurus-plugin-content-docs/version-7.x/fundamentals/planning.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
sidebar_position: 7
33
title: 规划阶段
44
---
5-
import BrowserOnly from '@docusaurus/BrowserOnly';
6-
import DocusaurusInversifyCodeEditor from '@site/src/components/DocusaurusInversifyCodeEditor';
75

86
# 规划阶段
97

@@ -98,12 +96,6 @@ interface PlanResult {
9896
- 特定于类型的元数据(类元数据、参数、属性注入等)
9997
- 依赖项的子服务节点
10098

101-
## 可视化规划树
102-
103-
使用下面的交互式代码编辑器尝试不同的绑定配置并查看生成的规划树。编辑器允许你编写 InversifyJS 代码并可视化生成的规划结构,帮助你了解容器如何解析你的依赖项。
104-
105-
<DocusaurusInversifyCodeEditor style={{ height: 500 }} />
106-
10799
## 性能考虑
108100

109101
规划阶段旨在高效:

packages/docs/services/inversify-site/i18n/zh/docusaurus-plugin-content-docs/version-7.x/internals/planning.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
sidebar_position: 1
33
title: 规划阶段
44
---
5-
import BrowserOnly from '@docusaurus/BrowserOnly';
6-
import DocusaurusInversifyCodeEditor from '@site/src/components/DocusaurusInversifyCodeEditor';
75

86
# 规划阶段
97

@@ -98,12 +96,6 @@ interface PlanResult {
9896
- 特定于类型的元数据(类元数据、参数、属性注入等)
9997
- 依赖项的子服务节点
10098

101-
## 可视化规划树
102-
103-
使用下面的交互式代码编辑器尝试不同的绑定配置并查看生成的规划树。编辑器允许你编写 InversifyJS 代码并可视化生成的规划结构,帮助你了解容器如何解析你的依赖项。
104-
105-
<DocusaurusInversifyCodeEditor style={{ height: 500 }} />
106-
10799
## 性能考虑
108100

109101
规划阶段旨在高效:

packages/docs/services/inversify-site/i18n/zh/docusaurus-plugin-content-docs/version-8.x/internals/planning.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ interface PlanResult {
100100

101101
## 可视化规划树
102102

103-
使用下面的交互式代码编辑器尝试不同的绑定配置并查看生成的规划树。编辑器允许你编写 InversifyJS 代码并可视化生成的规划结构,帮助你了解容器如何解析你的依赖项
103+
使用下面的交互式代码编辑器尝试不同的绑定配置。在 **Editor** 标签页中编写 InversifyJS 代码,点击 **Run** 按钮执行,然后切换到 **Graph** 标签页查看以交互式图表形式呈现的依赖关系规划树
104104

105105
<DocusaurusInversifyCodeEditor style={{ height: 500 }} />
106106

packages/docs/services/inversify-site/i18n/zh/docusaurus-plugin-content-docs/version-8.x/introduction/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import gettingStartedSource from '@inversifyjs/code-examples/generated/examples/
1010
首先安装 `inversify``reflect-metadata`
1111

1212
```bash
13-
npm install inversify@beta reflect-metadata
13+
npm install inversify reflect-metadata
1414
```
1515

1616
接下来,初始化你的第一个容器并添加一些绑定:

packages/docs/services/inversify-site/src/components/DocusaurusInversifyCodeEditor/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ export default function DocusaurusInversifyCodeEditor({
7878
</TabItem>
7979
<TabItem value="graph" label="Graph">
8080
{graphEntries.length === 0 ? (
81-
<p>Run the code to generate a dependency graph.</p>
81+
<p>
82+
No graph yet. Go to the <strong>Editor</strong> tab, write
83+
your code, and press <strong>Run</strong> to generate the
84+
dependency graph.
85+
</p>
8286
) : (
8387
<div style={{ marginBottom: '1rem', marginTop: '1rem' }}>
8488
<label

packages/docs/services/inversify-site/versioned_docs/version-7.x/internals/planning.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
sidebar_position: 1
33
title: Planning phase
44
---
5-
import BrowserOnly from '@docusaurus/BrowserOnly';
6-
import DocusaurusInversifyCodeEditor from '@site/src/components/DocusaurusInversifyCodeEditor';
75

86
# Planning Phase
97

@@ -98,12 +96,6 @@ Each binding node contains:
9896
- Type-specific metadata (class metadata, parameters, property injections, etc.)
9997
- Child service nodes for dependencies
10098

101-
## Visualizing Plan Trees
102-
103-
Use the interactive code editor below to experiment with different binding configurations and see the generated plan trees. The editor allows you to write InversifyJS code and visualizes the resulting plan structure, helping you understand how the container resolves your dependencies.
104-
105-
<DocusaurusInversifyCodeEditor style={{ height: 500 }} />
106-
10799
## Performance Considerations
108100

109101
The planning phase is designed to be efficient:

0 commit comments

Comments
 (0)