wearemerci/merci-installer

Composer installer plugin for Merci WordPress blocks

Maintainers

Package info

gitlab.com/merci-digital/merci-installer

Issues

Type:composer-plugin

pkg:composer/wearemerci/merci-installer

Statistics

Installs: 31

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.9 2026-03-09 19:54 UTC

This package is not auto-updated.

Last update: 2026-04-20 19:17:51 UTC


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