Fixes
Fixes #211 by @possumbilities
Description
This PR migrates the WordPress Gutenberg block setup from create-guten-block to @wordpress/scripts to address compatibility and stability issues. The migration updates the block’s structure, file setup, and namespace, aligning it with core WordPress practices as outlined in issue #211.
Key changes include:
Complete removal of create-guten-block and its dependencies.
Adoption of @wordpress/scripts for improved maintainability and compatibility.
Updated namespace from cgb to cc to align with WordPress conventions and ensure future compatibility.
Refactored CSS classes, HTML elements, and JavaScript function names to reflect the new cc namespace.
Technical details
Replaced all instances of wp.blocks and wp.blockEditor imports with @wordpress/block-editor.
Configured @wordpress/scripts for building, linting, and testing.
Updated CSS and JavaScript naming conventions to the new cc namespace.
Tests
To verify this PR:
Clone the branch and install dependencies.
Test the block on a WordPress instance to confirm compatibility with existing content.
Run all build and linting commands to confirm they execute without errors.
Verify that the blocks load and function as expected in the WordPress block editor.
Checklist
My pull request has a descriptive title (not a vague title like Update index.md).
My pull request targets the default branch of the repository (main or master).
My commit messages follow best practices.
My code follows the established code style of the repository.
I added or updated tests for the changes I made (if applicable).
I added or updated documentation (if applicable).
I tried running the project locally and verified that there are no visible errors.
Fixes Fixes #211 by @possumbilities Description This PR migrates the WordPress Gutenberg block setup from create-guten-block to @wordpress/scripts to address compatibility and stability issues. The migration updates the block’s structure, file setup, and namespace, aligning it with core WordPress practices as outlined in issue #211.
Key changes include:
Complete removal of create-guten-block and its dependencies. Adoption of @wordpress/scripts for improved maintainability and compatibility. Updated namespace from cgb to cc to align with WordPress conventions and ensure future compatibility. Refactored CSS classes, HTML elements, and JavaScript function names to reflect the new cc namespace. Technical details Replaced all instances of wp.blocks and wp.blockEditor imports with @wordpress/block-editor. Configured @wordpress/scripts for building, linting, and testing. Updated CSS and JavaScript naming conventions to the new cc namespace.
Tests To verify this PR:
Clone the branch and install dependencies. Test the block on a WordPress instance to confirm compatibility with existing content. Run all build and linting commands to confirm they execute without errors. Verify that the blocks load and function as expected in the WordPress block editor.
Checklist My pull request has a descriptive title (not a vague title like Update index.md). My pull request targets the default branch of the repository (main or master). My commit messages follow best practices. My code follows the established code style of the repository. I added or updated tests for the changes I made (if applicable). I added or updated documentation (if applicable). I tried running the project locally and verified that there are no visible errors.