Skip to content

Commit dc20352

Browse files
committed
Build/Test Tools: Update the grunt clean task after [61438].
The list of files cleaned through `grunt clean` was not updated as part of [61438]. This results in files persisting within `src/wp-includes` even after= they are removed. Props jorbin. Fixes #64716. See #64393. git-svn-id: https://develop.svn.wordpress.org/trunk@62051 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e31900f commit dc20352

1 file changed

Lines changed: 24 additions & 12 deletions

File tree

Gruntfile.js

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,30 @@ module.exports = function(grunt) {
4141
'wp-admin/css/colors/**/*.css',
4242
],
4343

44-
// All built js files, in /src or /build.
44+
// Built js files, in /src or /build.
4545
jsFiles = [
4646
'wp-admin/js/',
4747
'wp-includes/js/',
48-
'wp-includes/blocks/**/*.js',
49-
'wp-includes/blocks/**/*.js.map',
48+
],
49+
50+
// All files copied from the Gutenberg repository.
51+
gutenbergFiles = [
52+
'wp-includes/assets',
53+
'wp-includes/build',
54+
'wp-includes/js/dist',
55+
'wp-includes/css/dist',
56+
'wp-includes/blocks/**/*',
57+
'!wp-includes/blocks/index.php',
58+
'wp-includes/icons',
5059
],
5160

5261
// All files built by Webpack, in /src or /build.
62+
// Webpack only builds Core-specific media files and development scripts.
63+
// Blocks, packages, script modules, and vendors come from the Gutenberg build.
5364
webpackFiles = [
54-
'wp-includes/assets/*',
55-
'wp-includes/css/dist',
56-
'!wp-includes/assets/script-loader-packages.min.php',
57-
'!wp-includes/assets/script-modules-packages.min.php',
65+
'wp-includes/js/media-*.js',
66+
'wp-includes/js/media-*.min.js',
67+
'wp-includes/js/dist/development',
5868
],
5969

6070
// All workflow files that should be deleted from non-default branches.
@@ -229,13 +239,16 @@ module.exports = function(grunt) {
229239
js: jsFiles.map( function( file ) {
230240
return setFilePath( WORKING_DIR, file );
231241
} ),
242+
243+
// Clean files built by Webpack.
232244
'webpack-assets': webpackFiles.map( function( file ) {
233245
return setFilePath( WORKING_DIR, file );
234246
} ),
235-
'interactivity-assets': [
236-
WORKING_DIR + 'wp-includes/js/dist/interactivity.asset.php',
237-
WORKING_DIR + 'wp-includes/js/dist/interactivity.min.asset.php',
238-
],
247+
248+
// Clean files built by the tools/gutenberg scripts.
249+
gutenberg: gutenbergFiles.map( function( file ) {
250+
return setFilePath( WORKING_DIR, file );
251+
}),
239252
dynamic: {
240253
dot: true,
241254
expand: true,
@@ -1806,7 +1819,6 @@ module.exports = function(grunt) {
18061819
'clean:webpack-assets',
18071820
'webpack:prod',
18081821
'webpack:dev',
1809-
'clean:interactivity-assets',
18101822
] );
18111823

18121824
grunt.registerTask( 'build:js', [

0 commit comments

Comments
 (0)