Build Tools: Do not delete the (now committed) script-loader-packages.php file when running clean:js and copy it to /build. Fixes cases when running grunt watch or -dev where that file may be deleted and not recreated.

See #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47380 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2020-02-26 05:13:05 +00:00
parent 0975f8e79b
commit 3a4faa975f
2 changed files with 3 additions and 13 deletions

View File

@ -113,7 +113,6 @@ module.exports = function(grunt) {
], ],
js: [ js: [
WORKING_DIR + 'wp-admin/js/', WORKING_DIR + 'wp-admin/js/',
WORKING_DIR + 'wp-includes/assets/',
WORKING_DIR + 'wp-includes/js/' WORKING_DIR + 'wp-includes/js/'
], ],
'webpack-assets': [ 'webpack-assets': [
@ -146,7 +145,6 @@ module.exports = function(grunt) {
expand: true, expand: true,
cwd: SOURCE_DIR, cwd: SOURCE_DIR,
src: buildFiles.concat( [ src: buildFiles.concat( [
'!assets/**', // Assets is extracted into separate copy tasks.
'!js/**', // JavaScript is extracted into separate copy tasks. '!js/**', // JavaScript is extracted into separate copy tasks.
'!.{svn,git}', // Exclude version control folders. '!.{svn,git}', // Exclude version control folders.
'!wp-includes/version.php', // Exclude version.php. '!wp-includes/version.php', // Exclude version.php.
@ -356,16 +354,8 @@ module.exports = function(grunt) {
] ]
}, },
'webpack-assets': { 'webpack-assets': {
files: [
{
src: WORKING_DIR + 'wp-includes/js/dist/assets.php', src: WORKING_DIR + 'wp-includes/js/dist/assets.php',
dest: SOURCE_DIR + 'wp-includes/assets/script-loader-packages.php' dest: WORKING_DIR + 'wp-includes/assets/script-loader-packages.php'
},
{
src: WORKING_DIR + 'wp-includes/js/dist/assets.php',
dest: BUILD_DIR + 'wp-includes/assets/script-loader-packages.php'
}
]
}, },
version: { version: {
options: { options: {

File diff suppressed because one or more lines are too long