Skip to content

fix: add missing docs for local dependencies #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

```
```toml
[package]
name = "my_pkg"
```
Expand All @@ -39,7 +39,7 @@ name = "my_pkg"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -51,7 +51,7 @@ version = "0.1.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -64,7 +64,7 @@ edition = "0.5.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand Down Expand Up @@ -101,7 +101,7 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
```
Expand All @@ -110,13 +110,24 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
```

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

### 3.3 local dependency

通过 path 指定本地三方库依赖。

```toml
[dependencies]
<package name> = {path = "<package local path>"}
```

这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。

## 4. entries

你可以在编译时指定包的入口点。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

```
```toml
[package]
name = "my_pkg"
```
Expand All @@ -39,7 +39,7 @@ name = "my_pkg"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -51,7 +51,7 @@ version = "0.1.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -64,7 +64,7 @@ edition = "0.5.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand Down Expand Up @@ -101,7 +101,7 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
```
Expand All @@ -110,13 +110,24 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
```

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

### 3.3 local dependency

通过 path 指定本地三方库依赖。

```toml
[dependencies]
<package name> = {path = "<package local path>"}
```

这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。

## 4. entries

你可以在编译时指定包的入口点。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

```
```toml
[package]
name = "my_pkg"
```
Expand All @@ -39,7 +39,7 @@ name = "my_pkg"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -51,7 +51,7 @@ version = "0.1.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -64,7 +64,7 @@ edition = "0.5.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand Down Expand Up @@ -101,7 +101,7 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
```
Expand All @@ -110,13 +110,24 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
```

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

### 3.3 local dependency

通过 path 指定本地三方库依赖。

```toml
[dependencies]
<package name> = {path = "<package local path>"}
```

这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。

## 4. entries

你可以在编译时指定包的入口点。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

```
```toml
[package]
name = "my_pkg"
```
Expand All @@ -39,7 +39,7 @@ name = "my_pkg"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -51,7 +51,7 @@ version = "0.1.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand All @@ -64,7 +64,7 @@ edition = "0.5.0"

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

```
```toml
[package]
name = "my_pkg"
version = "0.1.0"
Expand Down Expand Up @@ -101,7 +101,7 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", tag = "<git repo tag>" }
```
Expand All @@ -110,13 +110,24 @@ k8s = "1.27"

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

```
```toml
[dependencies]
<package name> = { git = "<git repo url>", commit = "<git repo commit>" }
```

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

### 3.3 local dependency

通过 path 指定本地三方库依赖。

```toml
[dependencies]
<package name> = {path = "<package local path>"}
```

这将会从本地文件路径 `<package local path>` 中加载名称为 `<package name>` 的包。

## 4. entries

你可以在编译时指定包的入口点。
Expand Down
Loading