wearemerci / merci-blocks
WordPress blocks for Merci projects
Requires
- php: >=8.0
README
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
| Block | Source |
|---|---|
| Hero | blocks/hero/ |
| Slider | blocks/slider/ |
| Cards | blocks/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
- Create a new folder inside
blocks/:
blocks/
└── my-block/
├── my-block.js
├── my-block.sass
├── my-block.php
└── my-block.pug
- Commit and push.
- Create a new version tag.
- 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 structure1.1.1→ Installer logic moved to merci-installer plugin2.0.0→ Future breaking changes
See full history in CHANGELOG.md.
License
MIT — Thomas Fleury