使用 Composer Archive 将文件添加到子文件夹

发布于 2025-01-11 01:10:55 字数 449 浏览 6 评论 0原文

我使用 composer archive 命令将我的 PHP 电子商务插件存档到 zip 文件。它运行良好,但我有一个问题:它不会在存档中创建子文件夹,这使得它与目标平台上的 Web 安装程序不兼容。

当前的 zip 结构:

  • plugin.zip
    • 文件1.php
    • 文件2.php
    • config.yml

所需的 zip 结构:

  • plugin.zip
    • 插件文件夹
      • 文件1.php
      • 文件2.php
      • config.yml

有没有办法使用composer archive来实现这样的结果?如果没有,我愿意接受替代方案。

I use composer archive command to archive my PHP e-commerce plugin to a zip file. It works well but I have one issue: it does not create a sub-folder within the archive which makes it incompatible with web installer on targeted platform.

Current zip structure:

  • plugin.zip
    • file1.php
    • file2.php
    • config.yml

Desired zip structure:

  • plugin.zip
    • plugin-folder
      • file1.php
      • file2.php
      • config.yml

Is there a way to achieve such result using composer archive? If not, I am open for alternatives.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文