{"id":228593,"date":"2022-10-18T16:20:00","date_gmt":"2022-10-18T13:20:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=228593"},"modified":"2022-11-09T03:10:38","modified_gmt":"2022-11-09T00:10:38","slug":"dodajte-tochki-vhodu-do-scenariju-stvorennja-bloku-wordpress","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/dodajte-tochki-vhodu-do-scenariju-stvorennja-bloku-wordpress\/","title":{"rendered":"\u0414\u043e\u0434\u0430\u0439\u0442\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0443 \u0434\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0431\u043b\u043e\u043a\u0443 WordPress"},"content":{"rendered":"\n<p>\u041a\u043e\u043b\u0438 \u0432\u0438 \u0432\u043f\u0435\u0440\u0448\u0435 \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u0442\u0435 \u0431\u043b\u043e\u043a \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0431\u043b\u043e\u043a\u0443 WordPress, <code>npm init @wordpress\/block<\/code>\u0432\u0456\u043d \u043d\u0430\u0434\u0430\u0454 \u0432\u0430\u043c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0443 \u0434\u043e <code>\/src\/index.js<\/code>, \u044f\u043a\u0443 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 \u0432\u0441\u0456\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0456\u0432 \u0456 \u0441\u0442\u0438\u043b\u0456\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u0431\u043b\u043e\u043a\u0456\u0432.<\/p>\n<p>\u0406\u043d\u043e\u0434\u0456 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0456\u043d\u0448\u0456 \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0443, \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u043b\u043e\u043a\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u0456\u0432 WordPress (Gutenberg) \u0432 \u0456\u043d\u0448\u043e\u043c\u0443 \u043c\u0456\u0441\u0446\u0456 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430, \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, <a href=\"https:\/\/wholesomecode.ltd\/guides\/create-settings-page-wordpress-gutenberg-components\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c<\/a> \u0430\u0431\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u044e\u0432\u0430\u0447\u0456.<\/p>\n<p>\u0426\u0435\u0439 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a \u0434\u043e\u043f\u043e\u043c\u043e\u0436\u0435 \u0432\u0430\u043c \u0440\u043e\u0437\u0448\u0438\u0440\u0438\u0442\u0438 WordPress Create Block Script <code>webpack.config<\/code>, \u0449\u043e\u0431 \u0432\u0438 \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0434\u0430\u0442\u0438 \u0446\u0456 \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0456 \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0443.<\/p>\n<h2>\u043f\u0435\u0440\u0435\u0434\u0443\u043c\u043e\u0432\u0438<\/h2>\n<ul>\n<li>\u041e\u0437\u043d\u0430\u0439\u043e\u043c\u0442\u0435\u0441\u044f \u0437\u0456 <a href=\"https:\/\/wholesomecode.ltd\/guides\/creating-plugin-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f\u043c \u043f\u043b\u0430\u0433\u0456\u043d\u0456\u0432 \u0434\u043b\u044f WordPress Gutenberg \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e create block<\/a><\/li>\n<\/ul>\n<h2>\u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u0441\u0432\u043e\u0457 \u0444\u0430\u0439\u043b\u0438<\/h2>\n<p>\u0414\u043e\u0442\u0440\u0438\u043c\u0443\u044e\u0447\u0438\u0441\u044c \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0430 \u0437\u0456 <a href=\"https:\/\/wholesomecode.ltd\/guides\/creating-plugin-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e \u0431\u043b\u043e\u043a\u0443<\/a>, \u043c\u0438 \u0437\u0431\u0438\u0440\u0430\u0454\u043c\u043e\u0441\u044f \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043a\u0456\u043b\u044c\u043a\u0430 \u0444\u0430\u0439\u043b\u0456\u0432 \u0443 \u043d\u0430\u0448\u043e\u043c\u0443 \u0440\u0456\u0448\u0435\u043d\u043d\u0456:<\/p>\n<h3>\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438<code>\/src\/admin.js<\/code><\/h3>\n<p>\u0426\u0435\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u044e \u0442\u043e\u0447\u043a\u043e\u044e \u0432\u0445\u043e\u0434\u0443 \u0434\u043b\u044f \u0431\u0443\u0434\u044c-\u044f\u043a\u043e\u0433\u043e React, \u044f\u043a\u0438\u0439 \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u0435\u043a\u0440\u0430\u043d\u0430 \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 WordPress (\u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u044f\u043a\u0449\u043e \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e <a href=\"https:\/\/wholesomecode.ltd\/guides\/create-settings-page-wordpress-gutenberg-components\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0434\u043b\u044f \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430\u0448\u0438\u043c\u0438 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f\u043c\u0438 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456\u0432 Gutenberg<\/a>) .<\/p>\n<p>\u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u0444\u0430\u0439\u043b <code>\/src\/admin.js<\/code>\u0456 \u0432\u0441\u0442\u0430\u0432\u0442\u0435 \u0442\u0430\u043a\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code>import { __ } from '@wordpress\/i18n';\nimport api from '@wordpress\/api';\n\nimport '.\/admin.scss';\n<\/code><\/pre>\n<p>\u041c\u0438 \u0449\u0435 \u043d\u0456\u0447\u043e\u0433\u043e \u043d\u0435 \u0440\u043e\u0431\u0438\u043c\u043e \u0432 \u0446\u044c\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0456, \u0446\u0435 \u0431\u0443\u0434\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0445 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0456\u0432. \u041d\u0430\u0440\u0430\u0437\u0456 \u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0434\u0430\u0454\u043c\u043e \u043a\u043e\u0434, \u0449\u043e\u0431 \u043c\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a \u0432\u0456\u043d \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0454 <code>\/src\/admin.scss<\/code>\u0444\u0430\u0439\u043b, \u044f\u043a\u0438\u0439 \u0431\u0443\u0434\u0435 \u0441\u043a\u043e\u043c\u043f\u0456\u043b\u044c\u043e\u0432\u0430\u043d\u043e, \u0449\u043e\u0431 \u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0435\u0441\u044c \u043d\u0430\u0448 \u0432\u043b\u0430\u0441\u043d\u0438\u0439 CSS \u0434\u043b\u044f \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 WordPress.<\/p>\n<h3>\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438<code>\/src\/admin.scss<\/code><\/h3>\n<p>\u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u0444\u0430\u0439\u043b <code>\/src\/admin.scss<\/code>\u0456 \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u0438\u0439 SCSS:<\/p>\n<pre><code>body {\n  background: pink;\n}\n<\/code><\/pre>\n<p>\u0417\u043d\u043e\u0432\u0443 \u0436 \u0442\u0430\u043a\u0438, \u0446\u0435\u0439 \u043a\u043e\u0434 \u043d\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 SCSS.<\/p>\n<h3>\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438<code>\/webpack.config.js<\/code><\/h3>\n<p>\u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u0444\u0430\u0439\u043b \u0443 \u043a\u043e\u0440\u0435\u043d\u0435\u0432\u0456\u0439 \u043f\u0430\u043f\u0446\u0456 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0456\u043d\u0430 \u043f\u0456\u0434 \u043d\u0430\u0437\u0432\u043e\u044e <code>webpack.config.js<\/code>\u043c\u0438 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e, \u0449\u043e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u0446\u044c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0443.<\/p>\n<h2>\u0412\u0456\u0434\u0440\u0435\u0434\u0430\u0433\u0443\u0439\u0442\u0435 \u043a\u043e\u0440\u0435\u043d\u0435\u0432\u0438\u0439 \u0444\u0430\u0439\u043b PHP \u043f\u043b\u0430\u0433\u0456\u043d\u0430<\/h2>\n<p>\u042f\u043a\u0449\u043e \u0432\u0438 \u0434\u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e\u0433\u043e \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0430, \u0446\u0435\u0439 \u043f\u043b\u0430\u0433\u0456\u043d \u043d\u0430\u0437\u0438\u0432\u0430\u0442\u0438\u043c\u0435\u0442\u044c\u0441\u044f <code>wholesome-plugin.php<\/code>.<\/p>\n<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0456 \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e \u0437\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0432\u0430\u0442\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u0457 \u0434\u043b\u044f \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0457 \u043e\u0431\u043b\u0430\u0441\u0442\u0456, \u044f\u043a\u0456 \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0438\u0432\u0435\u0434\u0435\u043d\u0456 \u043d\u0430\u0448\u043e\u044e \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0454\u044e webpack. \u0414\u043e\u0434\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0432 \u043a\u0456\u043d\u0446\u0456 \u0446\u044c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0443:<\/p>\n<pre><code>function wholesomecode_wholesome_plugin_admin_scripts() {\n    $dir = __DIR__;\n\n    $script_asset_path = \"$dir\/build\/admin.asset.php\";\n    if (! file_exists( $script_asset_path)) {\n        throw new Error(\n            'You need to run `npm start` or `npm run build` for the \"wholesomecode\/wholesome-plugin\" block first.'\n        );\n    }\n    $admin_js     = 'build\/admin.js';\n    $script_asset = require( $script_asset_path );\n    wp_register_script(\n        'wholesomecode-wholesome-plugin-admin-editor',\n        plugins_url( $admin_js, __FILE__ ),\n        $script_asset['dependencies'],\n        $script_asset['version']\n    );\n    wp_set_script_translations( 'wholesomecode-wholesome-plugin-block-editor', 'wholesome-plugin' );\n\n    $admin_css = 'build\/admin.css';\n    wp_enqueue_style(\n        'wholesomecode-wholesome-plugin-admin',\n        plugins_url( $admin_css, __FILE__ ),\n        ['wp-components'],\n        filemtime( \"$dir\/$admin_css\") );\n}\nadd_action( 'admin_enqueue_scripts', 'wholesomecode_wholesome_plugin_admin_scripts', 10 );\n<\/code><\/pre>\n<p>\u041c\u0438 \u043c\u0430\u0439\u0436\u0435 \u0441\u043a\u043e\u043f\u0456\u044e\u0432\u0430\u043b\u0438 \u043a\u043e\u0434 \u0456\u0437 \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0443 \u0432 \u0447\u0435\u0440\u0437\u0456, \u0430\u043b\u0435 \u0437\u0440\u043e\u0431\u0438\u043b\u0438 \u0439\u043e\u0433\u043e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0438\u043c \u043d\u0430\u0448\u0438\u043c \u043e\u0447\u0456\u043a\u0443\u0432\u0430\u043d\u0438\u043c \u0432\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u0430\u043c <code>\/build\/admin.js<\/code>\u0456 <code>\/build\/admin.css<\/code>. \u0417\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0443\u0432\u0430\u0433\u0443, \u0449\u043e \u043c\u0438 \u0442\u0430\u043a\u043e\u0436 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0454\u043c\u043e \u0441\u043f\u0435\u0446\u0456\u0430\u043b\u044c\u043d\u043e \u0437\u0433\u0435\u043d\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 <code>\/build\/admin.asset.php<\/code>\u0444\u0430\u0439\u043b, \u044f\u043a\u0438\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0434\u043e\u0434\u0430\u0441\u0442\u044c \u0443\u0441\u0456 \u0437\u0430\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0456 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u0456\u0432 WordPress (Gutenberg) \u0434\u043b\u044f \u043d\u0430\u0448\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438<code>webPack.config<\/code><\/h2>\n<p>\u041d\u0430 \u043a\u0440\u043e\u0446\u0456 2 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u043b\u0438 \u0444\u0430\u0439\u043b <code>webpack.config.js<\/code>, \u0443 \u0446\u0435\u0439 \u0444\u0430\u0439\u043b \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code>const defaultConfig = require( '@wordpress\/scripts\/config\/webpack.config' );\nconst path = require( 'path' );\n\nmodule.exports = {\n    ...defaultConfig,\n    entry: {\n        ...defaultConfig.entry,\n        admin: path.resolve( process.cwd(), 'src', 'admin.js' ),\n    }\n};\n<\/code><\/pre>\n<p>\u0426\u0435\u0439 \u043a\u043e\u0434 \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0454 <code>webpack.config<\/code>\u0437 <code>@wordpress\/scripts<\/code>. \u0426\u0435 \u043a\u043e\u0434, \u044f\u043a\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043a\u043e\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0443, \u043a\u043e\u043b\u0438 \u0432\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u0435 <code>npm start<\/code>\u0441\u0432\u043e\u0454 \u0440\u0456\u0448\u0435\u043d\u043d\u044f.<\/p>\n<p>\u0412\u0441\u0435, \u0449\u043e \u043c\u0438 \u0440\u043e\u0431\u0438\u043c\u043e, \u0446\u0435 \u0431\u0435\u0440\u0435\u043c\u043e \u0446\u044e \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u044e \u0442\u0430 \u0434\u043e\u0434\u0430\u0454\u043c\u043e \u0456\u043d\u0448\u0443 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0443 \u0437 \u0440\u044f\u0434\u043a\u043e\u043c <code>admin: path.resolve( process.cwd(), 'src', 'admin.js' ),<\/code>.<\/p>\n<p>\u0420\u0435\u0448\u0442\u0430 \u043a\u043e\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u044f\u0454 webpack \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f, \u044f\u043a\u0456 \u0432\u0436\u0435 \u0454 (\u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434 <code>...defautConfig<\/code>, <code>...defaultConfig.entry<\/code>).<\/p>\n<h2>\u0421\u043a\u043e\u043c\u043f\u0456\u043b\u044e\u0439\u0442\u0435 \u043a\u043e\u0434<\/h2>\n<p>\u0421\u043a\u043e\u043c\u043f\u0456\u043b\u044e\u0439\u0442\u0435 \u0441\u0432\u0456\u0439 \u043f\u043b\u0430\u0433\u0456\u043d \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e <code>npm start<\/code>\u043a\u043e\u043c\u0430\u043d\u0434\u0438, \u0456 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0438\u0432\u0438\u043c\u043e\u0441\u044f, \u0449\u043e \u0432\u0456\u0434\u0431\u0443\u0432\u0430\u0454\u0442\u044c\u0441\u044f:<\/p>\n<p>\u041a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u044f \u043a\u043e\u0434\u0443 \u0437 \u043d\u043e\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u043e\u044e \u0432\u0445\u043e\u0434\u0443<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440 \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u0439 \u0433\u0435\u043d\u0435\u0440\u0443\u0454 \u0434\u043b\u044f \u043d\u0430\u0441 \u043a\u0456\u043b\u044c\u043a\u0430 \u043d\u043e\u0432\u0438\u0445 \u0444\u0430\u0439\u043b\u0456\u0432:<\/p>\n<ul>\n<li>\n<p><code>\/build\/admin.assets.php<\/code>\u2014 \u0426\u0435\u0439 \u0444\u0430\u0439\u043b PHP \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0456\u0434 \u0447\u0430\u0441 <code>\/src<\/code>\u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 \u043f\u0430\u043f\u043a\u0438. \u0412\u0456\u043d \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0431\u0456\u0440 \u0443\u0441\u0456\u0445 \u043f\u0440\u0430\u0432\u0438\u043b JavaScript \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 WordPress (Gutenberg), \u044f\u043a\u0456 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0442\u044c\u0441\u044f \u0432\u0430\u0448\u043e\u044e \u043d\u043e\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u043e\u044e \u0432\u0445\u043e\u0434\u0443. \u0412\u0456\u043d \u0441\u0442\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u0447\u0435\u0440\u0433\u0443 \u0447\u0435\u0440\u0435\u0437 \u0433\u043e\u043b\u043e\u0432\u043d\u0438\u0439 <code>wholesome-plugin.php<\/code>\u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0432\u0430\u0447\u0430 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0444\u0443\u043d\u043a\u0446\u0456\u0457, \u044f\u043a\u0443 \u043c\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>\/build\/admin.css<\/code>\u2014 \u0426\u0435 \u0444\u0430\u0439\u043b CSS \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u044f\u043a\u0438\u0439 \u0434\u043e\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0434\u043e \u0447\u0435\u0440\u0433\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u0438\u0439 <code>wholesome-plugin.php<\/code>\u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0432\u0430\u0447\u0430 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0444\u0443\u043d\u043a\u0446\u0456\u0457, \u044f\u043a\u0443 \u043c\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>\/build\/admin.js<\/code>\u2014 \u0426\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u0438\u0439 \u0441\u043a\u043e\u043c\u043f\u0456\u043b\u044c\u043e\u0432\u0430\u043d\u0438\u0439 \u0444\u0430\u0439\u043b JavaScript, \u044f\u043a\u0438\u0439 \u0434\u043e\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0434\u043e \u0447\u0435\u0440\u0433\u0438 \u0447\u0435\u0440\u0435\u0437 \u0433\u043e\u043b\u043e\u0432\u043d\u0438\u0439 <code>wholesome-plugin.php<\/code>\u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0432\u0430\u0447\u0430 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0444\u0443\u043d\u043a\u0446\u0456\u0457, \u044f\u043a\u0443 \u043c\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code>\/build\/admin.css.map<\/code>\u2014 \u0426\u0435\u0439 \u0444\u0430\u0439\u043b \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u0435 \u043f\u0456\u0434 \u0447\u0430\u0441 \u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 \u0430\u043a\u0442\u0438\u0432\u0456\u0432 \u0434\u043b\u044f \u0440\u0435\u0436\u0438\u043c\u0443 \u0440\u043e\u0437\u0440\u043e\u0431\u043a\u0438 (IE, \u044f\u043a\u0438\u0439 \u0432\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u0435, <code>npm start<\/code>\u0430 \u043d\u0435 <code>npm build<\/code>\u043f\u0456\u0434 \u0447\u0430\u0441 \u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 \u0441\u0432\u043e\u0457\u0445 \u0430\u043a\u0442\u0438\u0432\u0456\u0432. \u0426\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0443\u0432\u0430\u0447\u0456\u0432, \u044f\u043a\u0438\u0439 \u0434\u043e\u043f\u043e\u043c\u043e\u0436\u0435 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438 \u0456\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u0456\u0432 \u0456 \u043d\u043e\u043c\u0435\u0440\u0438 \u0440\u044f\u0434\u043a\u0456\u0432 \u0443 CSS \u0443 \u0440\u0430\u0437\u0456 \u0432\u0438\u043d\u0438\u043a\u043d\u0435\u043d\u043d\u044f \u043f\u043e\u043c\u0438\u043b\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p><code>\/build\/admin.js.map<\/code>\u2014 \u0426\u0435\u0439 \u0444\u0430\u0439\u043b \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u0435 \u043f\u0456\u0434 \u0447\u0430\u0441 \u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 \u0440\u0435\u0441\u0443\u0440\u0441\u0456\u0432 \u0434\u043b\u044f \u0440\u0435\u0436\u0438\u043c\u0443 \u0440\u043e\u0437\u0440\u043e\u0431\u043a\u0438 (IE, \u044f\u043a\u0438\u0439 \u0432\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u0435, <code>npm start<\/code>\u0430 \u043d\u0435 <code>npm build<\/code>\u043f\u0456\u0434 \u0447\u0430\u0441 \u043a\u043e\u043c\u043f\u0456\u043b\u044f\u0446\u0456\u0457 \u0440\u0435\u0441\u0443\u0440\u0441\u0456\u0432. \u0426\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0443\u0432\u0430\u0447\u0456\u0432 JavaScript, \u0449\u043e\u0431 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0442\u0438 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438 \u0456\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u0456\u0432 \u0456 \u043d\u043e\u043c\u0435\u0440\u0438 \u0440\u044f\u0434\u043a\u0456\u0432 \u0443 \u0440\u0430\u0437\u0456 \u0432\u0438\u043d\u0438\u043a\u043d\u0435\u043d\u043d\u044f \u043f\u043e\u043c\u0438\u043b\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f <a href=\"https:\/\/wholesomecode.ltd\/guides\/post-meta-fields-store-attributes-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043c\u0435\u0442\u0430-\u043f\u043e\u043b\u0456\u0432 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 \u0413\u0443\u0442\u0435\u043d\u0431\u0435\u0440\u0433\u0430<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f <a href=\"https:\/\/wholesomecode.ltd\/guides\/options-settings-data-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c \u0443 \u0431\u043b\u043e\u043a\u0430\u0445 \u0413\u0443\u0442\u0435\u043d\u0431\u0435\u0440\u0433\u0430<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f <a href=\"https:\/\/wholesomecode.ltd\/guides\/custom-meta-boxes-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0432\u043b\u0430\u0441\u043d\u0438\u0445 \u043c\u0435\u0442\u0430\u0431\u043e\u043a\u0441\u0456\u0432 \u0443 Gutenberg<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f <a href=\"https:\/\/wholesomecode.ltd\/guides\/create-settings-page-wordpress-gutenberg-components\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456\u0432 Gutenberg<\/a><\/p>\n<\/li>\n<\/ul>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/wholesomecode.ltd\" class=\"external external_icon\">wholesomecode.ltd<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u043e\u043b\u0438 \u0432\u0438 \u0432\u043f\u0435\u0440\u0448\u0435 \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u0442\u0435 \u0431\u043b\u043e\u043a \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0431\u043b\u043e\u043a\u0443 WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e npm init @wordpress\/block, \u0432\u0456\u043d \u043d\u0430\u0434\u0430\u0454 \u0432\u0430\u043c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0443 \u0432 \/src\/index.js, \u044f\u043a\u0443 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0456&#8230;<\/p>\n","protected":false},"author":1,"featured_media":221177,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[756,902,849,788,923,725],"tags":[1174],"class_list":["post-228593","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vidkryte-dzherelo","category-kod-3","category-pidruchnyky","category-prohramne-zabezpechennia-z-vidkrytym-kodom","category-inshyj","category-rozrobnyk","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/228593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/comments?post=228593"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/228593\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/221177"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=228593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=228593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=228593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}