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 28
28
29
29
例如: 一个包名为 my_pkg 的 kcl 程序包。
30
30
31
- ```
31
+ ``` toml
32
32
[package ]
33
33
name = " my_pkg"
34
34
```
@@ -39,7 +39,7 @@ name = "my_pkg"
39
39
40
40
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
41
41
42
- ```
42
+ ``` toml
43
43
[package ]
44
44
name = " my_pkg"
45
45
version = " 0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
51
51
52
52
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` , 并且与 0.5.1 的 KCL 编译器兼容。
53
53
54
- ```
54
+ ``` toml
55
55
[package ]
56
56
name = " my_pkg"
57
57
version = " 0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
64
64
65
65
例如: ` my_pkg ` 程序包的描述为 ` This is my package. ` 。
66
66
67
- ```
67
+ ``` toml
68
68
[package ]
69
69
name = " my_pkg"
70
70
version = " 0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101
101
102
102
根据 git 仓库中的 tag 指定对应的依赖。
103
103
104
- ```
104
+ ``` toml
105
105
[dependencies ]
106
106
<package name> = { git = " <git repo url>" , tag = " <git repo tag>" }
107
107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110
110
111
111
根据 git 仓库中的 commit id 指定对应的依赖。
112
112
113
- ```
113
+ ``` toml
114
114
[dependencies ]
115
115
<package name> = { git = " <git repo url>" , commit = " <git repo commit>" }
116
116
```
117
117
118
118
这将会从 Git 存储库` <git repo url> ` 中拉取名称为 ` <package name> ` 的包,` commit id ` 为 ` <git repo commit> ` 。
119
119
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
+
120
131
## 4. entries
121
132
122
133
你可以在编译时指定包的入口点。
Original file line number Diff line number Diff line change 28
28
29
29
例如: 一个包名为 my_pkg 的 kcl 程序包。
30
30
31
- ```
31
+ ``` toml
32
32
[package ]
33
33
name = " my_pkg"
34
34
```
@@ -39,7 +39,7 @@ name = "my_pkg"
39
39
40
40
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
41
41
42
- ```
42
+ ``` toml
43
43
[package ]
44
44
name = " my_pkg"
45
45
version = " 0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
51
51
52
52
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` , 并且与 0.5.1 的 KCL 编译器兼容。
53
53
54
- ```
54
+ ``` toml
55
55
[package ]
56
56
name = " my_pkg"
57
57
version = " 0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
64
64
65
65
例如: ` my_pkg ` 程序包的描述为 ` This is my package. ` 。
66
66
67
- ```
67
+ ``` toml
68
68
[package ]
69
69
name = " my_pkg"
70
70
version = " 0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101
101
102
102
根据 git 仓库中的 tag 指定对应的依赖。
103
103
104
- ```
104
+ ``` toml
105
105
[dependencies ]
106
106
<package name> = { git = " <git repo url>" , tag = " <git repo tag>" }
107
107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110
110
111
111
根据 git 仓库中的 commit id 指定对应的依赖。
112
112
113
- ```
113
+ ``` toml
114
114
[dependencies ]
115
115
<package name> = { git = " <git repo url>" , commit = " <git repo commit>" }
116
116
```
117
117
118
118
这将会从 Git 存储库` <git repo url> ` 中拉取名称为 ` <package name> ` 的包,` commit id ` 为 ` <git repo commit> ` 。
119
119
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
+
120
131
## 4. entries
121
132
122
133
你可以在编译时指定包的入口点。
Original file line number Diff line number Diff line change 28
28
29
29
例如: 一个包名为 my_pkg 的 kcl 程序包。
30
30
31
- ```
31
+ ``` toml
32
32
[package ]
33
33
name = " my_pkg"
34
34
```
@@ -39,7 +39,7 @@ name = "my_pkg"
39
39
40
40
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
41
41
42
- ```
42
+ ``` toml
43
43
[package ]
44
44
name = " my_pkg"
45
45
version = " 0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
51
51
52
52
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` , 并且与 0.5.1 的 KCL 编译器兼容。
53
53
54
- ```
54
+ ``` toml
55
55
[package ]
56
56
name = " my_pkg"
57
57
version = " 0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
64
64
65
65
例如: ` my_pkg ` 程序包的描述为 ` This is my package. ` 。
66
66
67
- ```
67
+ ``` toml
68
68
[package ]
69
69
name = " my_pkg"
70
70
version = " 0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101
101
102
102
根据 git 仓库中的 tag 指定对应的依赖。
103
103
104
- ```
104
+ ``` toml
105
105
[dependencies ]
106
106
<package name> = { git = " <git repo url>" , tag = " <git repo tag>" }
107
107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110
110
111
111
根据 git 仓库中的 commit id 指定对应的依赖。
112
112
113
- ```
113
+ ``` toml
114
114
[dependencies ]
115
115
<package name> = { git = " <git repo url>" , commit = " <git repo commit>" }
116
116
```
117
117
118
118
这将会从 Git 存储库` <git repo url> ` 中拉取名称为 ` <package name> ` 的包,` commit id ` 为 ` <git repo commit> ` 。
119
119
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
+
120
131
## 4. entries
121
132
122
133
你可以在编译时指定包的入口点。
Original file line number Diff line number Diff line change 28
28
29
29
例如: 一个包名为 my_pkg 的 kcl 程序包。
30
30
31
- ```
31
+ ``` toml
32
32
[package ]
33
33
name = " my_pkg"
34
34
```
@@ -39,7 +39,7 @@ name = "my_pkg"
39
39
40
40
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` 。
41
41
42
- ```
42
+ ``` toml
43
43
[package ]
44
44
name = " my_pkg"
45
45
version = " 0.1.0"
@@ -51,7 +51,7 @@ version = "0.1.0"
51
51
52
52
例如: ` my_pkg ` 程序包的版本号为 ` 0.1.0 ` , 并且与 0.5.1 的 KCL 编译器兼容。
53
53
54
- ```
54
+ ``` toml
55
55
[package ]
56
56
name = " my_pkg"
57
57
version = " 0.1.0"
@@ -64,7 +64,7 @@ edition = "0.5.0"
64
64
65
65
例如: ` my_pkg ` 程序包的描述为 ` This is my package. ` 。
66
66
67
- ```
67
+ ``` toml
68
68
[package ]
69
69
name = " my_pkg"
70
70
version = " 0.1.0"
@@ -101,7 +101,7 @@ k8s = "1.27"
101
101
102
102
根据 git 仓库中的 tag 指定对应的依赖。
103
103
104
- ```
104
+ ``` toml
105
105
[dependencies ]
106
106
<package name> = { git = " <git repo url>" , tag = " <git repo tag>" }
107
107
```
@@ -110,13 +110,24 @@ k8s = "1.27"
110
110
111
111
根据 git 仓库中的 commit id 指定对应的依赖。
112
112
113
- ```
113
+ ``` toml
114
114
[dependencies ]
115
115
<package name> = { git = " <git repo url>" , commit = " <git repo commit>" }
116
116
```
117
117
118
118
这将会从 Git 存储库` <git repo url> ` 中拉取名称为 ` <package name> ` 的包,` commit id ` 为 ` <git repo commit> ` 。
119
119
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
+
120
131
## 4. entries
121
132
122
133
你可以在编译时指定包的入口点。
You can’t perform that action at this time.
0 commit comments