-
Notifications
You must be signed in to change notification settings - Fork 315
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
Major structural overhaul to the repo #195
Conversation
…the build directory.
…wn for IDE integration.
Love the idea. I had the same thoughts when looking at the new folder structure.
What prevents us from keeping all types of blocks in --| src An alternative would be to make the Do you know why we need |
How changes proposed in #193 relate to this PR? |
This is tricky, for anything that contains a block.json file, everything works as expected and all the assets are copied correctly to the correct folders. For the non-block examples, however, only the |
Do you think we should try renaming
This needs to be confirmed. The current folder structure is a bit confusing when you see it for the first time. We need at least to document it because
I think it's important to name top-level folders correctly and document them in the README file. |
…x instead of src.
…purpose of the variable.
.github/workflows/nodejs.yml
Outdated
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x] |
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.
I recommend using Node.js 14, 16 and 18 - all current LTE versions.
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.
This action is going to be changed but I'll update this now - thanks!
import { registerFormatType, toggleFormat } from '@wordpress/rich-text'; | ||
import { RichTextToolbarButton } from '@wordpress/block-editor'; | ||
|
||
const MyCustomButton = ({ isActive, onChange, value }) => { |
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.
Code formatting looks like a regular Prettier instead of the wp-prettier
fork 😅
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.
🤦 I can't even tell the difference any more 😆
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.
Locally I added prettier": "npm:[email protected]",
and ran format
from wp-scripts
which seemed to work so I pushed those changes update. I'm in a weird state where I have my eslint wanting one thing and format another so I'll have to get that sorted out.
I've made a few changes to the approach for this PR:
|
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.
Let's give it a try and iterate further with follow-up work. It should help with repository management. Awsome work @ryanwelcher.
Fix the link to the finished app code in the gutenberg-examples repository to point to new location. See WordPress/gutenberg-examples@33348e9 or WordPress/gutenberg-examples#195
Fix the link to the finished app code in the gutenberg-examples repository to point to new location. See WordPress/gutenberg-examples@33348e9 or WordPress/gutenberg-examples#195
This PR is an attempt to simplify the structure of the repo by using a single build process for all of the examples.
Benefits:
@wordpress/scripts
package by leveraging both the built-in handling of multiple blocks while also adding our own functionality via an extendedwebpack.config.js
file.build
directory. This will make using an Action to generate a new .zip archive much easier and potentially allow us to not have to version thebuild
directory - which is not a common practice in the wild.Changes:
src
directory as would be done normally when using the scripts package.