Skip to content

Commit 2872180

Browse files
authored
Merge pull request #383 from zong-zhe/fix-missing-doc
fix: add missing docs for local dependencies
2 parents 7713782 + e68b2f7 commit 2872180

File tree

4 files changed

+68
-24
lines changed
  • i18n/zh-CN/docusaurus-plugin-content-docs
    • current/user_docs/guides/package-management/4-how-to
    • version-0.7/user_docs/guides/package-management/4-how-to
    • version-0.8/user_docs/guides/package-management/4-how-to
    • version-0.9/user_docs/guides/package-management/4-how-to

4 files changed

+68
-24
lines changed

i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/8-kcl_mod.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
例如: 一个包名为 my_pkg 的 kcl 程序包。
3030

31-
```
31+
```toml
3232
[package]
3333
name = "my_pkg"
3434
```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939

4040
例如: `my_pkg` 程序包的版本号为 `0.1.0`
4141

42-
```
42+
```toml
4343
[package]
4444
name = "my_pkg"
4545
version = "0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
5151

5252
例如: `my_pkg` 程序包的版本号为 `0.1.0`, 并且与 0.5.1 的 KCL 编译器兼容。
5353

54-
```
54+
```toml
5555
[package]
5656
name = "my_pkg"
5757
version = "0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
6464

6565
例如: `my_pkg` 程序包的描述为 `This is my package.`
6666

67-
```
67+
```toml
6868
[package]
6969
name = "my_pkg"
7070
version = "0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101101

102102
根据 git 仓库中的 tag 指定对应的依赖。
103103

104-
```
104+
```toml
105105
[dependencies]
106106
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
107107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110110

111111
根据 git 仓库中的 commit id 指定对应的依赖。
112112

113-
```
113+
```toml
114114
[dependencies]
115115
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
116116
```
117117

118118
这将会从 Git 存储库`<git repo url>`中拉取名称为 `<package name>` 的包,`commit id``<git repo commit>`
119119

120+
### 3.3 local dependency
121+
122+
通过 path 指定本地三方库依赖。
123+
124+
```toml
125+
[dependencies]
126+
<package name> = {path = "<package local path>"}
127+
```
128+
129+
这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。
130+
120131
## 4. entries
121132

122133
你可以在编译时指定包的入口点。

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7/user_docs/guides/package-management/4-how-to/8-kcl_mod.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
例如: 一个包名为 my_pkg 的 kcl 程序包。
3030

31-
```
31+
```toml
3232
[package]
3333
name = "my_pkg"
3434
```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939

4040
例如: `my_pkg` 程序包的版本号为 `0.1.0`
4141

42-
```
42+
```toml
4343
[package]
4444
name = "my_pkg"
4545
version = "0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
5151

5252
例如: `my_pkg` 程序包的版本号为 `0.1.0`, 并且与 0.5.1 的 KCL 编译器兼容。
5353

54-
```
54+
```toml
5555
[package]
5656
name = "my_pkg"
5757
version = "0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
6464

6565
例如: `my_pkg` 程序包的描述为 `This is my package.`
6666

67-
```
67+
```toml
6868
[package]
6969
name = "my_pkg"
7070
version = "0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101101

102102
根据 git 仓库中的 tag 指定对应的依赖。
103103

104-
```
104+
```toml
105105
[dependencies]
106106
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
107107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110110

111111
根据 git 仓库中的 commit id 指定对应的依赖。
112112

113-
```
113+
```toml
114114
[dependencies]
115115
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
116116
```
117117

118118
这将会从 Git 存储库`<git repo url>`中拉取名称为 `<package name>` 的包,`commit id``<git repo commit>`
119119

120+
### 3.3 local dependency
121+
122+
通过 path 指定本地三方库依赖。
123+
124+
```toml
125+
[dependencies]
126+
<package name> = {path = "<package local path>"}
127+
```
128+
129+
这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。
130+
120131
## 4. entries
121132

122133
你可以在编译时指定包的入口点。

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/user_docs/guides/package-management/4-how-to/8-kcl_mod.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
例如: 一个包名为 my_pkg 的 kcl 程序包。
3030

31-
```
31+
```toml
3232
[package]
3333
name = "my_pkg"
3434
```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939

4040
例如: `my_pkg` 程序包的版本号为 `0.1.0`
4141

42-
```
42+
```toml
4343
[package]
4444
name = "my_pkg"
4545
version = "0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
5151

5252
例如: `my_pkg` 程序包的版本号为 `0.1.0`, 并且与 0.5.1 的 KCL 编译器兼容。
5353

54-
```
54+
```toml
5555
[package]
5656
name = "my_pkg"
5757
version = "0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
6464

6565
例如: `my_pkg` 程序包的描述为 `This is my package.`
6666

67-
```
67+
```toml
6868
[package]
6969
name = "my_pkg"
7070
version = "0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101101

102102
根据 git 仓库中的 tag 指定对应的依赖。
103103

104-
```
104+
```toml
105105
[dependencies]
106106
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
107107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110110

111111
根据 git 仓库中的 commit id 指定对应的依赖。
112112

113-
```
113+
```toml
114114
[dependencies]
115115
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
116116
```
117117

118118
这将会从 Git 存储库`<git repo url>`中拉取名称为 `<package name>` 的包,`commit id``<git repo commit>`
119119

120+
### 3.3 local dependency
121+
122+
通过 path 指定本地三方库依赖。
123+
124+
```toml
125+
[dependencies]
126+
<package name> = {path = "<package local path>"}
127+
```
128+
129+
这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。
130+
120131
## 4. entries
121132

122133
你可以在编译时指定包的入口点。

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/user_docs/guides/package-management/4-how-to/8-kcl_mod.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
例如: 一个包名为 my_pkg 的 kcl 程序包。
3030

31-
```
31+
```toml
3232
[package]
3333
name = "my_pkg"
3434
```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939

4040
例如: `my_pkg` 程序包的版本号为 `0.1.0`
4141

42-
```
42+
```toml
4343
[package]
4444
name = "my_pkg"
4545
version = "0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
5151

5252
例如: `my_pkg` 程序包的版本号为 `0.1.0`, 并且与 0.5.1 的 KCL 编译器兼容。
5353

54-
```
54+
```toml
5555
[package]
5656
name = "my_pkg"
5757
version = "0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
6464

6565
例如: `my_pkg` 程序包的描述为 `This is my package.`
6666

67-
```
67+
```toml
6868
[package]
6969
name = "my_pkg"
7070
version = "0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101101

102102
根据 git 仓库中的 tag 指定对应的依赖。
103103

104-
```
104+
```toml
105105
[dependencies]
106106
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
107107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110110

111111
根据 git 仓库中的 commit id 指定对应的依赖。
112112

113-
```
113+
```toml
114114
[dependencies]
115115
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
116116
```
117117

118118
这将会从 Git 存储库`<git repo url>`中拉取名称为 `<package name>` 的包,`commit id``<git repo commit>`
119119

120+
### 3.3 local dependency
121+
122+
通过 path 指定本地三方库依赖。
123+
124+
```toml
125+
[dependencies]
126+
<package name> = {path = "<package local path>"}
127+
```
128+
129+
这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。
130+
120131
## 4. entries
121132

122133
你可以在编译时指定包的入口点。

0 commit comments

Comments
 (0)