Creating a plugin with @wordpress/create-blocks that has multiple blocks

Опубликовано: 07 Октябрь 2021
на канале: Ryan Welcher Codes
6,362
137

Update: This video is a little out of date. The code will still work, but the @wordpress/scripts package now supports multiple blocks by default. Check out this video for more    • Customizing your @wordpress/scripts b...  

We use the @wordpress/create-blocks package to scaffold a plugin that contains a single custom block. Then we modify the setup to be able to have multiple blocks.

Highights:

3:17 -14:35 Used the @wordpress/create-block package to scaffold a new plugin with a single block.
14:36 - 36:25 Restructured the plugin to allow for registering multiple blocks.
36:26 - 43:51 Added a custom webpack.config.js to set up one entry point per block.
44:00 Demo'd a custom template that uses the same structure: npx @wordpress/create-block --template @ryanwelcher/multiple-blocks-template.

Template url: https://www.npmjs.com/package/@ryanwe...
Repository for all my streams: https://github.com/ryanwelcher/twitch


Смотрите видео Creating a plugin with @wordpress/create-blocks that has multiple blocks онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Ryan Welcher Codes 07 Октябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 6,362 раз и оно понравилось 137 людям.