-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix static/dynamic block variants, add prompt for block templates, HMR support for blocks. #186
Conversation
@@ -13,8 +13,7 @@ | |||
], | |||
"scripts": { | |||
"build": "wp-scripts build --webpack-copy-php --webpack-src-dir=blocks", | |||
"dev": "npm run start", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if we should keep dev
around so that folks have a consistent experience when starting a project's development environment. npm run dev
is what I reach to first when starting up at least
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, good point. I saw it and was just trying to clean up. But that certainly makes sense.
Description
This Pull Request addresses an issue where the
create-block
script was not generating the static and dynamic variants of blocks. It also adds a prompt for selecting between block templates, and includes both variants within the selection. Additionally, this PR adds HMR (Hot Module Replacement) support for blocks in the editor.Changes Made
static
anddynamic
variants of blocks.map
Reason for Changes
The changes were made to improve the functionality and usability of the create-block script by ensuring that it generates all necessary block variants and providing the ability to select between block templates. The addition of HMR support for blocks in the editor is intended to improve the development experience by allowing for faster iteration and feedback during development.
Fixes #163