Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Migration from create-guten-block scripts to a @wordpress/scripts core setup #248

Closed
wants to merge 12 commits into from

Conversation

RonaldRonnie
Copy link

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.

attribution"

Explanation:

Conciseness: The message is concise and to the
point, conveying the core change.
Clarity: It clearly states that the enhancement
is related to adding image attribution to the
template part.
Specificity: While it doesn't explicitly mention
displaying attribution below each image,
 it implies that the added attribution feature
 can be customized to suit different display
 preferences.
Action-Oriented: The phrase "Add customizable
image attribution" suggests a positive action
taken to improve the template part.
scripts configuration

- Updated start script to use relative path
 for nodemon
- Replaced cgb-scripts to resolve NPM
configuration errors
- Ensured compatibility with the plugin
 development environment

Closes: cc-archive#230
scripts configuration

- Updated start script to use relative path
 for nodemon
- Replaced cgb-scripts to resolve NPM
 configuration errors
- Ensured compatibility with the plugin
 development environment

Closes: cc-archive#230
@RonaldRonnie RonaldRonnie requested review from a team as code owners November 7, 2024 08:10
@RonaldRonnie RonaldRonnie requested review from TimidRobot, Shafiya-Heena and ahmadbilaldev and removed request for a team November 7, 2024 08:10
not needed at all because its not related
not needed at all because its not related
not needed at all because its not related
not needed at all because its not related to the issue
not needed at all because its not related to the issue
@possumbilities
Copy link
Contributor

Closing due to conflicts and inactivity

@possumbilities possumbilities self-assigned this Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Scope strategy of the migration from create-guten-block scripts to a @wordpress/scripts core setup
2 participants