Make Sh
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
).category – Block category (
components
,layout
, defaultcomponents
).
The script performs:
Step
Result
Copy _block-base
Provides block.json, PHP template & SCSS stub
Replace tokens
dummy-name
→ slug, Dummy_Title
→ Title case
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 insidemake.sh
.
Last updated