{"repo":"thetwopct/create-acf-block-json","free":true,"listed":false,"github":"https://github.com/thetwopct/create-acf-block-json","clone":"git clone https://github.com/thetwopct/create-acf-block-json.git","description":"Create ACF Block JSON (create-acf-block-json) is a quick utility to scaffold an ACF block for the WordPress Block Editor (Gutenberg) using the block.json format","language":"JavaScript","stars":23,"topics":["acf","gutenberg","wordpress"],"license":null,"category":"cli-tools","readme_excerpt":"Create ACF Block JSON Quickly create a new WordPress Block that uses Advanced Custom Fields (ACF) and utilises block.json and block-specific CSS and PHP files. If you use ACF and make Gutenberg blocks, this simple utility should save you time scaffolding custom blocks. Minimum supported WordPress version: 6.5 Quick Start Install globally via npm: then navigate to where you want your block to be (i.e. /theme/blocks/), and run: What does Create ACF Block JSON do Create ACF Block JSON is an npm package command line program that will create a new folder in your current directory containing scaffolding for a new WordPress block using Advanced Custom Fields. It will generate: - Folder - containing folder for your block. - block.json - prefilled with common block information and default values. - PHP file - setup with basic information, classes and innerblocks. - SCSS files - for the frontend and editor. SCSS is useful if you use a compiler to output CSS files. - CSS file - for the frontend and editor. To write straight CSS or be overwritten by your processed SCSS. The script handles generating a unique class (.wp-block-namespace-name) for your block which is then referenced in each file. This script doesn't handle registration of the block - we recommend directory scanning methods to auto load blocks without registering each one. This method is outlined by Bill Erickson, but there are other examples online. This blog post by ACF also talks about how to register an ACF block, follow","default_branch":null,"files":null,"tree":[],"storefront":"/r/thetwopct","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thetwopct/create-acf-block-json/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}