Modular Block Registration in Roots Radicle

I’m currently looking into how to organise module registration more efficiently in Radicle’s setup. I want to know if it is possible to register modules in a way that allows variations, filters, and styles to be encapsulated within their relative block directory instead of registering them individually through roots.register.variations, roots.register.filters, etc.

I’d like to have a directory structure where each module related to a specific block is included in one block folder containing its variations, filters, and styles (kind of mimicking the WordPress block plugin registration structure):

./editor/blocks/
  ├── custom-block/
  │   ├── variations/
  │   ├── filters/
  │   ├── styles/
  │   └── index.ts

In index.ts, I would like to automatically include all its associated variations, filters and styles.

Is there a way to achieve this with the Radicle setup? Or is the Editor integration within bud-preset-wordpress library not configured to work that way?

3 Likes