Skip to content
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

feat: add doc for include and exclude in package section #451

Merged
merged 1 commit into from
Aug 28, 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 @@ -12,22 +12,26 @@ In the MVP version, the sections we plan to support are as follows:
- [version](#package) — The version of the package.
- [edition](#package) — The KCL compiler edition.
- [description](#package) — The description of the package.
- [include](#package) - The include file paths when packaging and publishing.
- [exclude](#package) - The exclude file paths when packaging and publishing.
- Dependency tables:
- [dependencies](#dependencies) - Package library dependencies.
- Compiler settings:
- [profile] - The compiler settings.
- profile - The compiler settings.
- [entries](#entries) - The entry points of the package when compiling.

## package

The first section in a `kcl.mod` is [package].

```
```toml
[package]
name = "hello_world" # the name of the package
version = "0.1.0" # the current version, obeying semver
edition = "0.5.0" # the KCL compiler version
description = "This is a hello world package." # the description of the package
include = ["src/", "README.md", "LICENSE"] # the include file paths when packaging and publishing
exclude = ["target/", ".git/", "*.log"] # the exclude file paths when packaging and publishing
```

## dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
- [version](#package) — 包的版本。
- [edition](#package) — KCL 编译器版本。
- [description](#package) — 包的描述。
- [include](#include) - 在打包和发布时包含的文件。
- [exclude](#exclude) - 在打包和发布时排除的文件。
- 依赖表:
- [dependencies](#dependencies) - 包库依赖项。
- 编译器设置:
Expand Down Expand Up @@ -72,6 +74,36 @@ edition = "0.5.0"
description = "This is my package."
```

### 2.5. include

你可以使用 `include` 字段指定打包和发布时包含的文件。

`include` 是 `package` 部分的字段。

```toml
[package]
name = "hello_world"
version = "0.1.0"
edition = "0.5.0"
description = "This is a hello world package."
include = ["src/", "README.md", "LICENSE"] # 打包和发布时包含的文件
```

### 2.6. exclude

你可以使用 `exclude` 字段指定打包和发布时排除的文件。

`exclude` 是 `package` 部分的字段。

```toml
[package]
name = "hello_world"
version = "0.1.0"
edition = "0.5.0"
description = "This is a hello world package."
exclude = ["target/", ".git/", "*.log"] # 打包和发布时排除的文件
```

## 3. dependencies

你的 kcl 包可以依赖于来自 OCI 仓库、Git 存储库或本地文件系统子目录的其他库。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
- [version](#package) — 包的版本。
- [edition](#package) — KCL 编译器版本。
- [description](#package) — 包的描述。
- [include](#include) - 在打包和发布时包含的文件。
- [exclude](#exclude) - 在打包和发布时排除的文件。
- 依赖表:
- [dependencies](#dependencies) - 包库依赖项。
- 编译器设置:
Expand Down Expand Up @@ -72,6 +74,36 @@ edition = "0.5.0"
description = "This is my package."
```

### 2.5. include

你可以使用 `include` 字段指定打包和发布时包含的文件。

`include` 是 `package` 部分的字段。

```toml
[package]
name = "hello_world"
version = "0.1.0"
edition = "0.5.0"
description = "This is a hello world package."
include = ["src/", "README.md", "LICENSE"] # 打包和发布时包含的文件
```

### 2.6. exclude

你可以使用 `exclude` 字段指定打包和发布时排除的文件。

`exclude` 是 `package` 部分的字段。

```toml
[package]
name = "hello_world"
version = "0.1.0"
edition = "0.5.0"
description = "This is a hello world package."
exclude = ["target/", ".git/", "*.log"] # 打包和发布时排除的文件
```

## 3. dependencies

你的 kcl 包可以依赖于来自 OCI 仓库、Git 存储库或本地文件系统子目录的其他库。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
- [version](#package) — 包的版本。
- [edition](#package) — KCL 编译器版本。
- [description](#package) — 包的描述。
- [include](#include) - 在打包和发布时包含的文件。
- [exclude](#exclude) - 在打包和发布时排除的文件。
- 依赖表:
- [dependencies](#dependencies) - 包库依赖项。
- 编译器设置:
Expand Down Expand Up @@ -72,6 +74,36 @@ edition = "0.5.0"
description = "This is my package."
```

### 2.5. include

你可以使用 `include` 字段指定打包和发布时包含的文件。

`include` 是 `package` 部分的字段。

```toml
[package]
name = "hello_world"
version = "0.1.0"
edition = "0.5.0"
description = "This is a hello world package."
include = ["src/", "README.md", "LICENSE"] # 打包和发布时包含的文件
```

### 2.6. exclude

你可以使用 `exclude` 字段指定打包和发布时排除的文件。

`exclude` 是 `package` 部分的字段。

```toml
[package]
name = "hello_world"
version = "0.1.0"
edition = "0.5.0"
description = "This is a hello world package."
exclude = ["target/", ".git/", "*.log"] # 打包和发布时排除的文件
```

## 3. dependencies

你的 kcl 包可以依赖于来自 OCI 仓库、Git 存储库或本地文件系统子目录的其他库。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@ In the MVP version, the sections we plan to support are as follows:
- [version](#package) — The version of the package.
- [edition](#package) — The KCL compiler edition.
- [description](#package) — The description of the package.
- [include](#package) - The include file paths when packaging and publishing.
- [exclude](#package) - The exclude file paths when packaging and publishing.
- Dependency tables:
- [dependencies](#dependencies) - Package library dependencies.
- Compiler settings:
- [profile] - The compiler settings.
- profile - The compiler settings.
- [entries](#entries) - The entry points of the package when compiling.

## package

The first section in a `kcl.mod` is [package].

```
```toml
[package]
name = "hello_world" # the name of the package
version = "0.1.0" # the current version, obeying semver
edition = "0.5.0" # the KCL compiler version
description = "This is a hello world package." # the description of the package
include = ["src/", "README.md", "LICENSE"] # the include file paths when packaging and publishing
exclude = ["target/", ".git/", "*.log"] # the exclude file paths when packaging and publishing
```

## dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@ In the MVP version, the sections we plan to support are as follows:
- [version](#package) — The version of the package.
- [edition](#package) — The KCL compiler edition.
- [description](#package) — The description of the package.
- [include](#package) - The include file paths when packaging and publishing.
- [exclude](#package) - The exclude file paths when packaging and publishing.
- Dependency tables:
- [dependencies](#dependencies) - Package library dependencies.
- Compiler settings:
- [profile] - The compiler settings.
- profile - The compiler settings.
- [entries](#entries) - The entry points of the package when compiling.

## package

The first section in a `kcl.mod` is [package].

```
```toml
[package]
name = "hello_world" # the name of the package
version = "0.1.0" # the current version, obeying semver
edition = "0.5.0" # the KCL compiler version
description = "This is a hello world package." # the description of the package
include = ["src/", "README.md", "LICENSE"] # the include file paths when packaging and publishing
exclude = ["target/", ".git/", "*.log"] # the exclude file paths when packaging and publishing
```

## dependencies
Expand Down
Loading