Skip to content

Commit f8aecf9

Browse files
committed
Build: Update Gutenberg integration to checkout-and-build approach.
This changes WordPress Core's Gutenberg integration from npm packages to checking out and building Gutenberg directly. Instead of syncing individual npm packages, Core now checks out the Gutenberg repository, builds it, and copies the build artifacts. This enables Core to use Gutenberg's advanced features like route-based navigation, full-page rendering, and the Font Library, while also streamlining future updates. New commands: * `npm run gutenberg:checkout` - Clones Gutenberg at a specified ref * `npm run gutenberg:build` - Runs Gutenberg's build process * `npm run gutenberg:copy` - Copies and transforms build output to Core * `npm run gutenberg:integrate` - Runs all three steps Main changes: * Removes webpack configs replaced by Gutenberg's build (blocks.js, packages.js, script-modules.js, development.js, vendors.js) * Adds Font Library page (`/wp-admin/font-library.php`) * Adds copy scripts to transform Gutenberg plugin paths to Core paths * Moves vendor copy step from webpack to Gruntfile New year, new process. Happy New Year! Props youknowriad, ellatrix, sirreal, westonruter, desrosj, tellthemachines. Fixes #64393. Built from https://develop.svn.wordpress.org/trunk@61438 git-svn-id: http://core.svn.wordpress.org/trunk@60750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 4d2234f commit f8aecf9

File tree

1,374 files changed

+521704
-422195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,374 files changed

+521704
-422195
lines changed

wp-admin/font-library.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/**
3+
* Font Library administration screen.
4+
*
5+
* @package WordPress
6+
* @subpackage Administration
7+
* @since 7.0.0
8+
*/
9+
10+
/** WordPress Administration Bootstrap */
11+
require_once __DIR__ . '/admin.php';
12+
13+
if ( ! current_user_can( 'edit_theme_options' ) ) {
14+
wp_die(
15+
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
16+
'<p>' . __( 'Sorry, you are not allowed to manage fonts on this site.' ) . '</p>',
17+
403
18+
);
19+
}
20+
21+
// Check if Gutenberg build files are available
22+
if ( ! function_exists( 'font_library_wp_admin_render_page' ) ) {
23+
wp_die(
24+
'<h1>' . __( 'Font Library is not available.' ) . '</h1>' .
25+
'<p>' . __( 'The Font Library requires Gutenberg integration. Please run <code>npm run gutenberg:integrate</code> to build the necessary files.' ) . '</p>',
26+
503
27+
);
28+
}
29+
30+
// Set the page title
31+
$title = _x( 'Fonts', 'Font Library admin page title' );
32+
33+
require_once ABSPATH . 'wp-admin/admin-header.php';
34+
35+
// Render the Font Library page
36+
font_library_wp_admin_render_page();
37+
38+
require_once ABSPATH . 'wp-admin/admin-footer.php';

wp-admin/includes/update-core.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,6 @@
837837
'wp-includes/blocks/post-template/editor.min.css',
838838
'wp-includes/blocks/post-template/editor-rtl.css',
839839
'wp-includes/blocks/post-template/editor-rtl.min.css',
840-
'wp-includes/js/dist/undo-manager.js',
841-
'wp-includes/js/dist/undo-manager.min.js',
842840
'wp-includes/js/dist/fields.min.js',
843841
'wp-includes/js/dist/fields.js',
844842
// 6.9

wp-admin/menu.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@
236236
}
237237
}
238238

239+
// Font Library menu item.
240+
$submenu['themes.php'][8] = array( __( 'Fonts' ), 'edit_theme_options', 'font-library.php' );
241+
239242
$customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );
240243

241244
// Hide Customize link on block themes unless a plugin or theme

wp-includes/assets/script-loader-packages.min.php

Lines changed: 831 additions & 1 deletion
Large diffs are not rendered by default.

wp-includes/assets/script-loader-packages.php

Lines changed: 831 additions & 1 deletion
Large diffs are not rendered by default.

wp-includes/assets/script-loader-react-refresh-entry.php

Lines changed: 0 additions & 1 deletion
This file was deleted.

wp-includes/assets/script-loader-react-refresh-runtime.min.php

Lines changed: 0 additions & 1 deletion
This file was deleted.

wp-includes/assets/script-loader-react-refresh-runtime.php

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 282 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,282 @@
1-
<?php return array('interactivity/index.min.js' => array('dependencies' => array(), 'version' => '90f16bd7fc9472806570', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array(), 'version' => 'dea7da43ce140b662d0f', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/a11y', 'import' => 'dynamic')), 'version' => '765a6ee8162122b48e6c', 'type' => 'module'), 'a11y/index.min.js' => array('dependencies' => array(), 'version' => 'b7d06936b8bc23cff2ad', 'type' => 'module'), 'block-library/accordion/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '3a414634555a20667d6c', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'f9665632b48682075277', 'type' => 'module'), 'block-library/form/view.min.js' => array('dependencies' => array(), 'version' => 'baaf25398238b4f2a821', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '292ec2cc397d10d98f6a', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'b0f909c3ec791c383210', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f55e93a1ad4806e91785', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '94fc611a7464b5de290a', 'type' => 'module'), 'block-editor/utils/fit-text-frontend.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'd6b553b57c3908edc8f8', 'type' => 'module'));
1+
<?php return array(
2+
'a11y/index.min.js' => array(
3+
'dependencies' => array(
4+
5+
),
6+
'version' => '1c371cb517a97cdbcb9f'
7+
),
8+
'abilities/index.min.js' => array(
9+
'dependencies' => array(
10+
'wp-data',
11+
'wp-i18n'
12+
),
13+
'version' => 'bd07cd6be9d3678c2a45'
14+
),
15+
'block-editor/utils/fit-text-frontend.min.js' => array(
16+
'dependencies' => array(
17+
18+
),
19+
'module_dependencies' => array(
20+
array(
21+
'id' => '@wordpress/interactivity',
22+
'import' => 'static'
23+
)
24+
),
25+
'version' => '2f00eb94b5ef309f39eb'
26+
),
27+
'block-library/accordion/view.min.js' => array(
28+
'dependencies' => array(
29+
30+
),
31+
'module_dependencies' => array(
32+
array(
33+
'id' => '@wordpress/interactivity',
34+
'import' => 'static'
35+
)
36+
),
37+
'version' => '2af01b43d30739c3fb8d'
38+
),
39+
'block-library/file/view.min.js' => array(
40+
'dependencies' => array(
41+
42+
),
43+
'module_dependencies' => array(
44+
array(
45+
'id' => '@wordpress/interactivity',
46+
'import' => 'static'
47+
)
48+
),
49+
'version' => '7d4d261d10dca47ebecb'
50+
),
51+
'block-library/form/view.min.js' => array(
52+
'dependencies' => array(
53+
54+
),
55+
'version' => '5542f8ad251fe43ef09e'
56+
),
57+
'block-library/image/view.min.js' => array(
58+
'dependencies' => array(
59+
60+
),
61+
'module_dependencies' => array(
62+
array(
63+
'id' => '@wordpress/interactivity',
64+
'import' => 'static'
65+
)
66+
),
67+
'version' => '3aa348554e724dae4f1f'
68+
),
69+
'block-library/navigation/view.min.js' => array(
70+
'dependencies' => array(
71+
72+
),
73+
'module_dependencies' => array(
74+
array(
75+
'id' => '@wordpress/interactivity',
76+
'import' => 'static'
77+
)
78+
),
79+
'version' => '7437ed5c45ee57daf02c'
80+
),
81+
'block-library/query/view.min.js' => array(
82+
'dependencies' => array(
83+
84+
),
85+
'module_dependencies' => array(
86+
array(
87+
'id' => '@wordpress/interactivity',
88+
'import' => 'static'
89+
),
90+
array(
91+
'id' => '@wordpress/interactivity-router',
92+
'import' => 'dynamic'
93+
)
94+
),
95+
'version' => '7a4ec5bfb61a7137cf4b'
96+
),
97+
'block-library/search/view.min.js' => array(
98+
'dependencies' => array(
99+
100+
),
101+
'module_dependencies' => array(
102+
array(
103+
'id' => '@wordpress/interactivity',
104+
'import' => 'static'
105+
)
106+
),
107+
'version' => '38bd0e230eaffa354d2a'
108+
),
109+
'block-library/tabs/view.min.js' => array(
110+
'dependencies' => array(
111+
112+
),
113+
'module_dependencies' => array(
114+
array(
115+
'id' => '@wordpress/interactivity',
116+
'import' => 'static'
117+
)
118+
),
119+
'version' => 'c08655def5ed243c4d65'
120+
),
121+
'boot/index.min.js' => array(
122+
'dependencies' => array(
123+
'react-jsx-runtime',
124+
'wp-commands',
125+
'wp-components',
126+
'wp-compose',
127+
'wp-core-data',
128+
'wp-data',
129+
'wp-editor',
130+
'wp-element',
131+
'wp-html-entities',
132+
'wp-i18n',
133+
'wp-keyboard-shortcuts',
134+
'wp-keycodes',
135+
'wp-primitives',
136+
'wp-private-apis',
137+
'wp-theme',
138+
'wp-url'
139+
),
140+
'module_dependencies' => array(
141+
array(
142+
'id' => '@wordpress/a11y',
143+
'import' => 'static'
144+
),
145+
array(
146+
'id' => '@wordpress/lazy-editor',
147+
'import' => 'dynamic'
148+
),
149+
array(
150+
'id' => '@wordpress/route',
151+
'import' => 'static'
152+
)
153+
),
154+
'version' => '5d918eb16ecdac63b2b1'
155+
),
156+
'core-abilities/index.min.js' => array(
157+
'dependencies' => array(
158+
'wp-api-fetch',
159+
'wp-url'
160+
),
161+
'module_dependencies' => array(
162+
array(
163+
'id' => '@wordpress/abilities',
164+
'import' => 'static'
165+
)
166+
),
167+
'version' => '336043fa59033fb5e9b0'
168+
),
169+
'edit-site-init/index.min.js' => array(
170+
'dependencies' => array(
171+
'react-jsx-runtime',
172+
'wp-data',
173+
'wp-element',
174+
'wp-primitives'
175+
),
176+
'module_dependencies' => array(
177+
array(
178+
'id' => '@wordpress/boot',
179+
'import' => 'static'
180+
)
181+
),
182+
'version' => '86ba14602c8af2333ca2'
183+
),
184+
'interactivity/index.min.js' => array(
185+
'dependencies' => array(
186+
187+
),
188+
'version' => '771756b5dd00167d1664'
189+
),
190+
'interactivity-router/full-page.min.js' => array(
191+
'dependencies' => array(
192+
193+
),
194+
'module_dependencies' => array(
195+
array(
196+
'id' => '@wordpress/interactivity-router',
197+
'import' => 'dynamic'
198+
)
199+
),
200+
'version' => '5c07cd7a12ae073c5241'
201+
),
202+
'interactivity-router/index.min.js' => array(
203+
'dependencies' => array(
204+
205+
),
206+
'module_dependencies' => array(
207+
array(
208+
'id' => '@wordpress/a11y',
209+
'import' => 'dynamic'
210+
),
211+
array(
212+
'id' => '@wordpress/interactivity',
213+
'import' => 'static'
214+
)
215+
),
216+
'version' => 'bb48ce8e3364d5290463'
217+
),
218+
'latex-to-mathml/index.min.js' => array(
219+
'dependencies' => array(
220+
221+
),
222+
'version' => 'e5fd3ae6d2c3b6e669da'
223+
),
224+
'latex-to-mathml/loader.min.js' => array(
225+
'dependencies' => array(
226+
227+
),
228+
'module_dependencies' => array(
229+
array(
230+
'id' => '@wordpress/latex-to-mathml',
231+
'import' => 'dynamic'
232+
)
233+
),
234+
'version' => '4f37456af539bd3d2351'
235+
),
236+
'lazy-editor/index.min.js' => array(
237+
'dependencies' => array(
238+
'react-jsx-runtime',
239+
'wp-block-editor',
240+
'wp-blocks',
241+
'wp-components',
242+
'wp-core-data',
243+
'wp-data',
244+
'wp-editor',
245+
'wp-element',
246+
'wp-i18n',
247+
'wp-private-apis',
248+
'wp-style-engine'
249+
),
250+
'version' => 'b6f9e7d8891174056fa8'
251+
),
252+
'route/index.min.js' => array(
253+
'dependencies' => array(
254+
'react',
255+
'react-dom',
256+
'react-jsx-runtime',
257+
'wp-private-apis'
258+
),
259+
'version' => '333002943024efaa0bcc'
260+
),
261+
'workflow/index.min.js' => array(
262+
'dependencies' => array(
263+
'react',
264+
'react-dom',
265+
'react-jsx-runtime',
266+
'wp-components',
267+
'wp-data',
268+
'wp-element',
269+
'wp-i18n',
270+
'wp-keyboard-shortcuts',
271+
'wp-primitives',
272+
'wp-private-apis'
273+
),
274+
'module_dependencies' => array(
275+
array(
276+
'id' => '@wordpress/abilities',
277+
'import' => 'static'
278+
)
279+
),
280+
'version' => '632383fbe66eca7e49c5'
281+
)
282+
);

0 commit comments

Comments
 (0)