Changeset 54289
- Timestamp:
- 09/23/2022 08:25:45 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/test-npm.yml
r54277 r54289 56 56 timeout-minutes: 20 57 57 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 58 continue-on-error: ${{ matrix.os == 'windows-latest' }}59 58 strategy: 60 59 fail-fast: false -
trunk/.gitignore
r54235 r54289 28 28 /src/wp-admin/css/colors/*/*.css 29 29 /src/wp-admin/js 30 /src/wp-includes/assets/* 31 !/src/wp-includes/assets/script-loader-packages.min.php 30 32 /src/wp-includes/js 31 33 /src/wp-includes/css/dist -
trunk/Gruntfile.js
r54276 r54289 126 126 WORKING_DIR + 'wp-includes/assets/*', 127 127 WORKING_DIR + 'wp-includes/css/dist/', 128 '!' + WORKING_DIR + 'wp-includes/assets/script-loader- *.php'128 '!' + WORKING_DIR + 'wp-includes/assets/script-loader-packages.min.php' 129 129 ], 130 130 dynamic: { -
trunk/src/wp-includes/assets
-
Property
svn:ignore
set to
script-loader-packages.php
script-loader-react-*.php
-
Property
svn:ignore
set to
-
trunk/src/wp-includes/script-loader.php
r54267 r54289 228 228 ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG 229 229 || empty( $scripts->registered['react'] ) 230 || defined( 'WP_RUN_CORE_TESTS' ) 230 231 ) { 231 232 return; … … 265 266 */ 266 267 function wp_default_packages_scripts( $scripts ) { 267 $suffix = wp_scripts_get_suffix(); 268 268 $suffix = defined( 'WP_RUN_CORE_TESTS' ) ? '.min' : wp_scripts_get_suffix(); 269 269 /* 270 270 * Expects multidimensional array like: … … 274 274 * 'api-fetch.js' => array(... 275 275 */ 276 $assets = include ABSPATH . WPINC . '/assets/script-loader-packages.php';277 278 foreach ( $assets as $ package_name => $package_data ) {279 $basename = basename( $package_name, '.js');276 $assets = include ABSPATH . WPINC . "/assets/script-loader-packages{$suffix}.php"; 277 278 foreach ( $assets as $file_name => $package_data ) { 279 $basename = str_replace( $suffix . '.js', '', basename( $file_name ) ); 280 280 $handle = 'wp-' . $basename; 281 281 $path = "/wp-includes/js/dist/{$basename}{$suffix}.js"; -
trunk/tests/phpunit/tests/dependencies/scripts.php
r54142 r54289 737 737 $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n"; 738 738 $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n"; 739 $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/i18n {$suffix}.js' id='wp-i18n-js'></script>\n";739 $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/i18n.min.js' id='wp-i18n-js'></script>\n"; 740 740 $expected .= "<script type='text/javascript' id='wp-i18n-js-after'>\n"; 741 741 $expected .= "wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } );\n"; 742 742 $expected .= "</script>\n"; 743 $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/a11y {$suffix}.js' id='wp-a11y-js'></script>\n";743 $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/a11y.min.js' id='wp-a11y-js'></script>\n"; 744 744 $expected .= "<script type='text/javascript' src='http://example2.com' id='test-example2-js'></script>\n"; 745 745 $expected .= "<script type='text/javascript' id='test-example2-js-after'>\nconsole.log(\"after\");\n</script>\n"; -
trunk/tools/webpack/development.js
r53140 r54289 36 36 }, 37 37 plugins: [ new DependencyExtractionWebpackPlugin( { 38 outputFilename: '../../../assets/script-loader-[name].php',38 outputFilename: `../../../assets/script-loader-[name]${ suffix }.php`, 39 39 } ) ], 40 40 }, … … 54 54 new DependencyExtractionWebpackPlugin( { 55 55 useDefaults: false, 56 outputFilename: '../../../assets/script-loader-[name].php'56 outputFilename: `../../../assets/script-loader-[name]${ suffix }.php` 57 57 } ), 58 58 ], -
trunk/tools/webpack/packages.js
r54257 r54289 159 159 injectPolyfill: true, 160 160 combineAssets: true, 161 combinedOutputFile: '../../assets/script-loader-packages.php',161 combinedOutputFile: `../../assets/script-loader-packages${ suffix }.php`, 162 162 } ), 163 163 new CopyWebpackPlugin( {
Note: See TracChangeset
for help on using the changeset viewer.