npx @wordpress/create-block command generates code/files different from what's in Gutenberg tutorial video #2400
Labels
[Content] Feedback
Feedback provided about content on Learn.
Priority - Medium
Medium priority issue.
Type of feedback
//content
Description
Around 13:00 of this tutorial video, titled "Intro to Gutenberg Block Development", after you're instructed to run the
npx @wordpress/create-block
command, the files/code he then walks through do not match what the command actually spit out for me in real time.https://learn.wordpress.org/tutorial/intro-to-gutenberg-block-development/
Step-by-step reproduction instructions (optional)
npx @wordpress/create-block
commandstarter-block.php
, I'm comparing it to the files that I have from the same command except in my case, I rannpx @wordpress/create-block@latest
.register_block_type
but the file/function format doesn't match the video. His file looks like this:Mine looks like this:
block.json
, a file not present in his file structure. See screenshots of the video versus my file structure (mine is the dark theme).You can see from the structures that there are some additional files in mine than what's in the tutorial.
Other information (optional)
I've been working in WordPress for over a decade now and am a full-stack developer trying to get familiar with how Gutenberg works. I can tell from his video versus the file structure the npx command gave, that the methods are similar, but because they're not the same number of files or functions are doing things differently than his examples, it makes it hard to follow along. I had to stop watching the video once I realized his
package.json
file (9:16) didn't contain the scripts that mine did to compile/run block related functionality. This is what's in mypackage.json
:The text was updated successfully, but these errors were encountered: