定制 wearemerci/merci-installer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

wearemerci/merci-installer

最新稳定版本:v0.1.9

Composer 安装命令:

composer require wearemerci/merci-installer

包简介

Composer installer plugin for Merci WordPress blocks

README 文档

README

version license

Composer plugin that installs and manages WordPress blocks for Merci Digital projects.

This plugin acts as an installer layer between Composer and wearemerci/merci-blocks.

Overview

wearemerci/merci-installer is a Composer plugin that:

  • Listens to post-package-install and post-package-update
  • Detects installation of wearemerci/merci-blocks
  • Reads available blocks from:

vendor/wearemerci/merci-blocks/blocks/

  • Interactively asks which blocks to install
  • Copies selected blocks into:

wp-dev/src/blocks/

All installation logic is fully contained inside this plugin.

Requirements

  • PHP >= 8.0
  • Composer >= 2.0
  • WordPress project based on wearemerci/wp-boilerplate

Installation

Usually installed automatically via the boilerplate.

Manual installation:

composer require wearemerci/merci-installer

Enable it in your root composer.json:

{
  "config": {
    "allow-plugins": {
      "wearemerci/merci-installer": true
    }
  }
}

Usage

Install blocks:

composer require wearemerci/merci-blocks

The plugin intercepts the installation and displays:

🧱 Merci Blocks — Installer
----------------------------------------
  1. hero
  2. slider
  3. cards
  0. Tous les blocks

Quels blocks veux-tu installer ? (ex: 1,3 ou 0) :

Selected blocks are copied automatically into:

wp-dev/src/blocks/

Architecture

composer require wearemerci/merci-blocks
        ↓
Composer triggers post-package-install
        ↓
Merci Installer intercepts the event
        ↓
Blocks discovered inside vendor/
        ↓
Selected blocks copied into project

Inspired by the Symfony Flex architecture: clear separation between package content and installation logic.

Versioning

This project follows Semantic Versioning.

  • 0.1.0 → Initial plugin structure
  • 0.1.1 → Event subscriber implementation
  • 0.1.2 → Event handling fixes
  • 0.1.3 → Direct block discovery logic
  • 0.1.4 → Stabilized interactive block copy system

Roadmap

  • Multi-repository block support (type: wearemerci-block)
  • Custom Composer command (composer merci:blocks)
  • CI-friendly configuration options

License

MIT — Merci Digital

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-27