A portable Bash script that creates a fully‑wired ACF block in seconds.
cd porter/blocks sh make.sh <block‑slug> [category]
block‑slug – Machine slug (testimonial-grid).
testimonial-grid
category – Block category (components, layout, default components).
components
layout
The script performs:
Copy _block-base
_block-base
Provides block.json, PHP template & SCSS stub
Replace tokens
dummy-name → slug, Dummy_Title → Title case
dummy-name
Dummy_Title
Create icon.svg
Unique block icon for the editor
Print next steps
Reminds you to edit the ACF fields
Tip: Add custom placeholders by editing _block-base and the sed commands inside make.sh.
make.sh
Last updated 7 months ago