diff --git a/src/wp-includes/blocks/archives.php b/src/wp-includes/blocks/archives/index.php
similarity index 100%
rename from src/wp-includes/blocks/archives.php
rename to src/wp-includes/blocks/archives/index.php
diff --git a/src/wp-includes/blocks/block.php b/src/wp-includes/blocks/block/index.php
similarity index 100%
rename from src/wp-includes/blocks/block.php
rename to src/wp-includes/blocks/block/index.php
diff --git a/src/wp-includes/blocks/calendar.php b/src/wp-includes/blocks/calendar/index.php
similarity index 100%
rename from src/wp-includes/blocks/calendar.php
rename to src/wp-includes/blocks/calendar/index.php
diff --git a/src/wp-includes/blocks/categories.php b/src/wp-includes/blocks/categories/index.php
similarity index 100%
rename from src/wp-includes/blocks/categories.php
rename to src/wp-includes/blocks/categories/index.php
diff --git a/src/wp-includes/blocks/latest-comments.php b/src/wp-includes/blocks/latest-comments/index.php
similarity index 100%
rename from src/wp-includes/blocks/latest-comments.php
rename to src/wp-includes/blocks/latest-comments/index.php
diff --git a/src/wp-includes/blocks/latest-posts.php b/src/wp-includes/blocks/latest-posts/index.php
similarity index 100%
rename from src/wp-includes/blocks/latest-posts.php
rename to src/wp-includes/blocks/latest-posts/index.php
diff --git a/src/wp-includes/blocks/rss.php b/src/wp-includes/blocks/rss/index.php
similarity index 100%
rename from src/wp-includes/blocks/rss.php
rename to src/wp-includes/blocks/rss/index.php
diff --git a/src/wp-includes/blocks/search.php b/src/wp-includes/blocks/search/index.php
similarity index 100%
rename from src/wp-includes/blocks/search.php
rename to src/wp-includes/blocks/search/index.php
diff --git a/src/wp-includes/blocks/shortcode.php b/src/wp-includes/blocks/shortcode/index.php
similarity index 100%
rename from src/wp-includes/blocks/shortcode.php
rename to src/wp-includes/blocks/shortcode/index.php
diff --git a/src/wp-includes/blocks/tag-cloud.php b/src/wp-includes/blocks/tag-cloud/index.php
similarity index 100%
rename from src/wp-includes/blocks/tag-cloud.php
rename to src/wp-includes/blocks/tag-cloud/index.php
diff --git a/src/wp-settings.php b/src/wp-settings.php
index cf4fffc6e7..5306fe9a4a 100644
a
|
b
|
|
257 | 257 | require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' ); |
258 | 258 | require( ABSPATH . WPINC . '/class-wp-block-parser.php' ); |
259 | 259 | require( ABSPATH . WPINC . '/blocks.php' ); |
260 | | require( ABSPATH . WPINC . '/blocks/archives.php' ); |
261 | | require( ABSPATH . WPINC . '/blocks/block.php' ); |
262 | | require( ABSPATH . WPINC . '/blocks/calendar.php' ); |
263 | | require( ABSPATH . WPINC . '/blocks/categories.php' ); |
264 | | require( ABSPATH . WPINC . '/blocks/latest-comments.php' ); |
265 | | require( ABSPATH . WPINC . '/blocks/latest-posts.php' ); |
266 | | require( ABSPATH . WPINC . '/blocks/rss.php' ); |
267 | | require( ABSPATH . WPINC . '/blocks/search.php' ); |
268 | | require( ABSPATH . WPINC . '/blocks/shortcode.php' ); |
269 | | require( ABSPATH . WPINC . '/blocks/tag-cloud.php' ); |
| 260 | require( ABSPATH . WPINC . '/blocks/archives/index.php' ); |
| 261 | require( ABSPATH . WPINC . '/blocks/block/index.php' ); |
| 262 | require( ABSPATH . WPINC . '/blocks/calendar/index.php' ); |
| 263 | require( ABSPATH . WPINC . '/blocks/categories/index.php' ); |
| 264 | require( ABSPATH . WPINC . '/blocks/latest-comments/index.php' ); |
| 265 | require( ABSPATH . WPINC . '/blocks/latest-posts/index.php' ); |
| 266 | require( ABSPATH . WPINC . '/blocks/rss/index.php' ); |
| 267 | require( ABSPATH . WPINC . '/blocks/search/index.php' ); |
| 268 | require( ABSPATH . WPINC . '/blocks/shortcode/index.php' ); |
| 269 | require( ABSPATH . WPINC . '/blocks/tag-cloud/index.php' ); |
270 | 270 | |
271 | 271 | $GLOBALS['wp_embed'] = new WP_Embed(); |
272 | 272 | |
diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
index e58b5274f3..c2519eb467 100644
a
|
b
|
const LiveReloadPlugin = require( 'webpack-livereload-plugin' ); |
7 | 7 | const postcss = require( 'postcss' ); |
8 | 8 | const UglifyJS = require( 'uglify-js' ); |
9 | 9 | |
10 | | const { join, basename } = require( 'path' ); |
| 10 | const { join, basename, dirname } = require( 'path' ); |
11 | 11 | const { get } = require( 'lodash' ); |
12 | 12 | |
13 | 13 | /** |
… |
… |
module.exports = function( env = { environment: 'production', watch: false, buil |
96 | 96 | |
97 | 97 | const phpFiles = { |
98 | 98 | 'block-serialization-default-parser/parser.php': 'wp-includes/class-wp-block-parser.php', |
99 | | 'block-library/src/archives/index.php': 'wp-includes/blocks/archives.php', |
100 | | 'block-library/src/block/index.php': 'wp-includes/blocks/block.php', |
101 | | 'block-library/src/calendar/index.php': 'wp-includes/blocks/calendar.php', |
102 | | 'block-library/src/categories/index.php': 'wp-includes/blocks/categories.php', |
103 | | 'block-library/src/latest-comments/index.php': 'wp-includes/blocks/latest-comments.php', |
104 | | 'block-library/src/latest-posts/index.php': 'wp-includes/blocks/latest-posts.php', |
105 | | 'block-library/src/rss/index.php': 'wp-includes/blocks/rss.php', |
106 | | 'block-library/src/search/index.php': 'wp-includes/blocks/search.php', |
107 | | 'block-library/src/shortcode/index.php': 'wp-includes/blocks/shortcode.php', |
108 | | 'block-library/src/tag-cloud/index.php': 'wp-includes/blocks/tag-cloud.php', |
109 | 99 | }; |
110 | 100 | |
| 101 | const blockNames = [ |
| 102 | 'archives', |
| 103 | 'block', |
| 104 | 'calendar', |
| 105 | 'categories', |
| 106 | 'latest-comments', |
| 107 | 'latest-posts', |
| 108 | 'rss', |
| 109 | 'search', |
| 110 | 'shortcode', |
| 111 | 'tag-cloud', |
| 112 | ]; |
| 113 | |
111 | 114 | const developmentCopies = mapVendorCopies( vendors, buildTarget ); |
112 | 115 | const minifiedCopies = mapVendorCopies( minifiedVendors, buildTarget ); |
113 | 116 | const minifyCopies = mapVendorCopies( minifyVendors, buildTarget ).map( ( copyCommand ) => { |
… |
… |
module.exports = function( env = { environment: 'production', watch: false, buil |
152 | 155 | to: join( baseDir, `src/${ phpFiles[ filename ] }` ), |
153 | 156 | } ) ); |
154 | 157 | |
| 158 | const blockCopies = blockNames.map( ( blockName ) => { |
| 159 | return { |
| 160 | from: join( baseDir, `node_modules/@wordpress/block-library/src/${ blockName }/*.+(php|json)` ), |
| 161 | to: join( baseDir, `src/wp-includes/blocks/${ blockName }/` ), |
| 162 | flatten: true, |
| 163 | }; |
| 164 | } ); |
| 165 | |
155 | 166 | const config = { |
156 | 167 | mode, |
157 | 168 | |
… |
… |
module.exports = function( env = { environment: 'production', watch: false, buil |
231 | 242 | ...vendorCopies, |
232 | 243 | ...cssCopies, |
233 | 244 | ...phpCopies, |
| 245 | ...blockCopies, |
234 | 246 | ], |
235 | 247 | ), |
236 | 248 | ], |