wearemerci/merci-blocks

WordPress blocks for Merci projects

Maintainers

Package info

gitlab.com/merci-digital/merci-blocks

Issues

pkg:composer/wearemerci/merci-blocks

Statistics

Installs: 27

Dependents: 0

Suggesters: 0

Stars: 0

v1.1.3 2026-03-01 22:44 UTC

This package is not auto-updated.

Last update: 2026-04-21 10:04:26 UTC


README

version license author

A collection of reusable WordPress blocks for Merci Digital projects.

This package provides block source files only.
Block installation is handled automatically by the wearemerci/merci-installer Composer plugin.

Requirements

  • Composer >= 2.0
  • PHP >= 8.0
  • wearemerci/merci-installer (installed automatically via the boilerplate)
  • wearemerci/wp-boilerplate

Installation

From the root of your WordPress project:

composer require wearemerci/merci-blocks

If the wearemerci/merci-installer plugin is installed and enabled, an interactive prompt will ask which blocks you want to install.

Example:

🧱 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 will be copied automatically to:

wp-dev/src/blocks/

Your build process (Gulp / ESBuild) will then compile them into your theme.

Available Blocks

BlockSource
Heroblocks/hero/
Sliderblocks/slider/
Cardsblocks/cards/

Project Structure

merci-blocks/
├── composer.json
└── blocks/
    ├── hero/
    │   ├── hero.js
    │   ├── hero.sass
    │   ├── hero.php
    │   └── hero.pug
    ├── slider/
    └── cards/

This repository contains only block source files.

Installation logic is fully handled by the Composer plugin: wearemerci/merci-installer.

Adding a New Block

  1. Create a new folder inside blocks/:
blocks/
└── my-block/
    ├── my-block.js
    ├── my-block.sass
    ├── my-block.php
    └── my-block.pug
  1. Commit and push.
  2. Create a new version tag.
  3. Run in your project:
composer update wearemerci/merci-blocks

The installer will detect the new block automatically.

How It Works

composer require wearemerci/merci-blocks
        ↓
merci-installer plugin intercepts the event
        ↓
Blocks are listed interactively
        ↓
Selected blocks copied to wp-dev/src/blocks/

The merci-blocks package contains no installation logic.

Versioning

This project follows Semantic Versioning.

  • 1.0.0 → First stable block (hero)
  • 1.1.0 → Monorepo structure
  • 1.1.1 → Installer logic moved to merci-installer plugin
  • 2.0.0 → Future breaking changes

See full history in CHANGELOG.md.

License

MIT — Thomas Fleury