定制 wearemerci/merci-blocks 二次开发

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

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

wearemerci/merci-blocks

最新稳定版本:v1.1.3

Composer 安装命令:

composer require wearemerci/merci-blocks

包简介

WordPress blocks for Merci projects

README 文档

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固