Skip to content

sudheer-ranga/develop-guten-blocks

Repository files navigation

develop-guten-blocks

A simple way to develop WordPress gutenberg blocks

This plugin provides easy way to develop WordPress gutenberg blocks.

Plugin comes ready with hot reload and code splitting so that you don't have to worry about plugin slowing down the Gutenberg block.

Note: I have used npm 10.16.0 during development

How to Install the plugin?

  1. Clone the repository in your wp-contents/plugins folder

git clone git@github.com:sudheer-ranga/develop-guten-blocks.git

Replace all the instances that says dbg to what ever you want to name your plugin.

  1. Install the dependencies

npm install

  1. Watch for changes

npm start

Adding a new block:

  1. Create a folder in src/blocks with your custom block name.

  2. Copy the edit and save folders that is present in say-hello block and change it according to your needs.

The static block has an example implementation for RichText block

To build for production

  1. Run npm run build

  2. In the plugin.php file, comment those lines that points to http://localhost:8000 and uncomment this line plugins_url( 'build/'[filename], __FILE__ )

About

A simple way to develop WordPress gutenberg blocks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published