File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 4 files changed +68
-24
lines changed Original file line number Diff line number Diff line change 2828
2929例如: 一个包名为 my_pkg 的 kcl 程序包。
3030
31- ```
31+ ``` toml
3232[package ]
3333name = " my_pkg"
3434```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939
4040例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
4141
42- ```
42+ ``` toml
4343[package ]
4444name = " my_pkg"
4545version = " 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 ]
5656name = " my_pkg"
5757version = " 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 ]
6969name = " my_pkg"
7070version = " 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你可以在编译时指定包的入口点。
Original file line number Diff line number Diff line change 2828
2929例如: 一个包名为 my_pkg 的 kcl 程序包。
3030
31- ```
31+ ``` toml
3232[package ]
3333name = " my_pkg"
3434```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939
4040例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
4141
42- ```
42+ ``` toml
4343[package ]
4444name = " my_pkg"
4545version = " 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 ]
5656name = " my_pkg"
5757version = " 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 ]
6969name = " my_pkg"
7070version = " 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你可以在编译时指定包的入口点。
Original file line number Diff line number Diff line change 2828
2929例如: 一个包名为 my_pkg 的 kcl 程序包。
3030
31- ```
31+ ``` toml
3232[package ]
3333name = " my_pkg"
3434```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939
4040例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
4141
42- ```
42+ ``` toml
4343[package ]
4444name = " my_pkg"
4545version = " 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 ]
5656name = " my_pkg"
5757version = " 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 ]
6969name = " my_pkg"
7070version = " 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你可以在编译时指定包的入口点。
Original file line number Diff line number Diff line change 2828
2929例如: 一个包名为 my_pkg 的 kcl 程序包。
3030
31- ```
31+ ``` toml
3232[package ]
3333name = " my_pkg"
3434```
@@ -39,7 +39,7 @@ name = "my_pkg"
3939
4040例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
4141
42- ```
42+ ``` toml
4343[package ]
4444name = " my_pkg"
4545version = " 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 ]
5656name = " my_pkg"
5757version = " 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 ]
6969name = " my_pkg"
7070version = " 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你可以在编译时指定包的入口点。
You can’t perform that action at this time.
0 commit comments