A few samples of WordPress Gutenberg blocks.
- NPM
- Babel
- WordPress 4.5+
- Gutenberg 2.8
Every block has its own folder and they're all coded using JSX markup, so to build your block, you'll need to access the block folder and install all dependencies with NPM.
npm install
After that, you just need to start the builder, that you'll listen to whatever changes on your block.js
npm run dev
This will generate your block.build.js that is the script that has to be uploaded.
Block simple provides a sample of a basic non-editable block.
A sample of an editable block.
A sample of an editable block with sidebar inspected controls.
A sample of an editable block with PHP server-side rendering.