Skip to content
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

Merged
merged 12 commits into from
Mar 31, 2023

Conversation

stevenslack
Copy link
Contributor

@stevenslack stevenslack commented Mar 31, 2023

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

  • Fixed issue where create-block script was not generating static and dynamic variants of blocks
  • Added prompt for selecting between block templates, with both variants included
  • Added HMR support for blocks in the editor (only at this point)
  • Prevented output of .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

@@ -13,8 +13,7 @@
],
"scripts": {
"build": "wp-scripts build --webpack-copy-php --webpack-src-dir=blocks",
"dev": "npm run start",
Copy link
Member

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

Copy link
Contributor Author

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.

@stevenslack stevenslack merged commit f35c95c into develop Mar 31, 2023
@stevenslack stevenslack deleted the feature/hmr-editor branch March 31, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add HMR Support
2 participants