wp-cli / dist-archive-command
根据插件或主题的 .distignore 文件创建基于该文件的 .zip 或 .tar.gz 分发包。
Requires
- php: >=7.4
- inmarelibero/gitignore-checker: ^1.0.4
- wp-cli/wp-cli: ^2
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-17 23:40:48 UTC
README
根据插件或主题的 .distignore 文件创建基于该文件的 .zip 或 .tar.gz 分发包。
使用
wp dist-archive <path> [<target>] [--create-target-dir] [--plugin-dirname=<plugin-slug>] [--format=<format>] [--filename-format=<filename-format>]
对于位于 'wp-content/plugins/hello-world' 目录下的插件,此命令会创建一个名为 'wp-content/plugins/hello-world.zip' 的分发存档。
您可以使用项目仓库中的 .distignore 文件指定要从存档中排除的文件或目录。
.distignore
.editorconfig
.git
.gitignore
.travis.yml
circle.yml
为多个项目使用一个分发存档命令,而不是在每个项目中使用 bash 脚本。
选项
<path>
Path to the project that includes a .distignore file.
[<target>]
Path and optional file name for the distribution archive.
If only a path is provided, the file name defaults to the project directory name plus the version, if discoverable.
Also, if only a path is given, the directory that it points to has to already exist for the command to function correctly.
[--create-target-dir]
Automatically create the target directory as needed.
[--plugin-dirname=<plugin-slug>]
Set the archive extract directory name. Defaults to project directory name.
[--format=<format>]
Choose the format for the archive.
---
default: zip
options:
- zip
- targz
---
[--filename-format=<filename-format>]
Use a custom format for archive filename. Available substitutions: {name}, {version}.
This is ignored if the <target> parameter is provided or the version cannot be determined.
---
default: "{name}.{version}"
---
安装
安装此包需要 WP-CLI v2 或更高版本。使用 wp cli update
更新到最新稳定版本。
完成更新后,您可以使用以下命令安装此包的最新稳定版本
wp package install wp-cli/dist-archive-command:@stable
要安装此包的最新开发版本,请使用以下命令代替
wp package install wp-cli/dist-archive-command:dev-master
贡献
我们感谢您为这个项目做出贡献的积极性。
贡献不仅限于代码。我们鼓励您以最适合您能力的方式做出贡献,例如编写教程、在您当地的聚会中展示、帮助其他用户解决支持问题或修订我们的文档。
有关更详细的介绍,请查看 WP-CLI 贡献指南。此包遵循那些政策和指南。
报告错误
认为找到了一个错误?我们很高兴您能帮助我们修复它。
在创建新问题之前,您应该 搜索现有问题,看看是否有现有的解决方案,或者它是否已经在更新的版本中修复。
在搜索过之后,如果您发现没有开放或已修复的问题与您的错误相关,请 创建一个新问题。尽可能提供详细信息,并在可能的情况下提供清晰的复现步骤。有关更多指导,请查看我们的错误报告文档。
创建 pull request
想要贡献一个新功能?请首先 打开一个新问题 讨论该功能是否适合此项目。
一旦您决定投入时间来推进您的 pull request,请 遵循我们创建 pull request 的指南,以确保这是一次愉快的体验。请参阅 "设置" 了解有关在本地工作于此包的特定细节。
支持
GitHub 问题不是用于一般支持问题的,但您可以尝试其他途径: https://wp-cli.org/#support
此README.md是从项目代码库中动态生成的,使用wp scaffold package-readme
命令(文档)。如需提出修改建议,请提交针对代码库相应部分的拉取请求。