Move ESNext to default code example shown #17873
This changes the documentation in the block tutorials. It adds clarification around ES5 and ESNext and by default shows ESNext code. This sets the documentation for having ESNext as a more preferred syntax, but does not remove any of the ES5 examples.
The reasoning behind this change is that it can be quite confusing to see mostly ES5 code in the documentation but then it is not the primary use case "in the wild". This makes for an odd disconnect, and I think the docs should reflect the real usage.
For example, the core Gutenberg packages and block library are all in ESNext, as well as the readme.md examples for each component is only in ESNext syntax. This is easiest to see using the WP Storybook
Additionally the majority of plugins and blocks from other code bases are in ESNext syntax, people learning Gutenberg will use these as a reference which can be confusing. CoBlocks is just but one example of many.
Initially discussed in Editor Chat
How has this been tested?
Confirm documentation still makes sense and works as described. No real functional change, the majority is just reordering of ESNext code block ahead of ES5.
Types of changes
- Also remove 05 numbering of examples, does not exist in examples repo And 05 in the examples repo is the recipe card.
Update loading of dependencies and version to match examples repo, using the asset_file from build script.