承接 vbuck/magento-module-bundler 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vbuck/magento-module-bundler

Composer 安装命令:

composer require vbuck/magento-module-bundler

包简介

Module bundling utility. Bundles Magento modules from Composer vendor spaces into ZIP artifacts.

README 文档

README

Bundles Magento modules from Composer vendor spaces into ZIP artifacts.

In some cases, a module must be installed using the app/code space, even though it is only configured for Composer based installation. This utility helps to bundle one or more Composer packages into a single ZIP archive.

Use Cases

  • Offering multiple options for installation without manual packaging effort.
  • Creating bundles of modules from one or more Composer packages for distribution.

This tool was built to support automated bundling of multiple Composer packages from a meta-package.

Installation

Works as a Composer package to load with your project:

composer config repositories.magento-module-bundler vcs https://github.com/vbuck/magento-module-bundler.git
composer require vbuck/magento-module-bundler:*

Or you can download the standalone CLI tool:

wget https://raw.githubusercontent.com/vbuck/magento-module-bundler/main/bin/module-bundler
chmod +x module-bundler
sudo mv module-bundler /usr/local/bin/

How to Use

Example scenario:

  1. I need to install a module into app/code but it only installs via Composer.
  2. To perform this action, I first need use Composer to download the package.
  3. I must then copy its content into the app/code space using the correct vendor and module name as a path.
  4. I must then remove the original copy from the vendor space, and optionally clean my Composer files.
  5. I can optionally bundle the moved contents into a ZIP archive for distribution.

I want to automate this process using a single command.

Code Sample

$instance = new \Vbuck\MagentoModuleBundler\Bundler('/path/to/magento/root');
$result = $instance->bundle(
    [
        'vendor/package1',
        'vendor/package2',
        '/path/to/other/package',
        'package-*',
    ],
    '/path/to/output',
    \Vbuck\MagentoModuleBundler\Bundler::BEHAVIOR_INDIVIDUAL_BUNDLES, // or BEHAVIOR_SINGLE_BUNDLE
    \Vbuck\MagentoModuleBundler\Bundler::OUTPUT_TYPE_MAGENTO // or OUTPUT_TYPE_COMPOSER
);

if ($result[0]->state === true) {
 echo "Module {$result[0]->name} has been bundled"; 
}

Command-Line Usage

bin/module-bundler --app-root=/path/to/magento \
    --package=/path/to/magento/root \
    --package=vendor/package1 \
    --package=/path/to/other/package \
    --package=package-*
    --single-bundle
    --output-path=/path/to/bundles

Options:
    --app-root[=PATH]       Optional path to a Magento installation. Defaults to current working directory.
    --output-path[=PATH]    Optional path to write your bundles. Defaults to current working directory.
    --package[=SEARCH]      A search string for a package. Can be absolute, relative, package name, wildcard.
    --single-bundle         Optional flag to bundle all matching packages into a single artifact.
    --composer-artifact     Optional flag to output the bundle as a Composer artifact instead of a Magento bundle.

Architectural Principles

  • Simple: low complexity, few dependencies, "gistable" deployment
  • Flexible: can use in a project or as a standalone utility

vbuck/magento-module-bundler 适用场景与选型建议

vbuck/magento-module-bundler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 413 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 03 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 vbuck/magento-module-bundler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vbuck/magento-module-bundler 我们能提供哪些服务?
定制开发 / 二次开发

基于 vbuck/magento-module-bundler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 413
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-13