Changeset 62052
- Timestamp:
- 03/19/2026 02:48:50 AM (2 days ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
Gruntfile.js (modified) (1 diff)
-
package.json (modified) (1 diff)
-
tools/gutenberg/utils.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r62051 r62052 1608 1608 opts: { stdio: 'inherit' } 1609 1609 }, function( error ) { 1610 done( ! error ); 1610 if ( error ) { 1611 done( false ); 1612 return; 1613 } 1614 /* 1615 * Build block editor files into the src directory every time assets 1616 * are downloaded. This prevents failures when running from src 1617 * without running `build:dev` after those files were removed from 1618 * version control in https://core.trac.wordpress.org/changeset/61438. 1619 * 1620 * See https://core.trac.wordpress.org/ticket/64393. 1621 */ 1622 grunt.util.spawn( { 1623 grunt: true, 1624 args: [ 'build:gutenberg', '--dev' ], 1625 opts: { stdio: 'inherit' } 1626 }, function( buildError ) { 1627 done( ! buildError ); 1628 } ); 1611 1629 } ); 1612 1630 } ); -
trunk/package.json
r62050 r62052 142 142 "gutenberg:copy": "node tools/gutenberg/copy.js", 143 143 "gutenberg:verify": "node tools/gutenberg/utils.js", 144 "gutenberg:download": "node tools/gutenberg/download.js ",144 "gutenberg:download": "node tools/gutenberg/download.js && grunt build:gutenberg --dev", 145 145 "vendor:copy": "node tools/vendors/copy-vendors.js", 146 146 "sync-gutenberg-packages": "grunt sync-gutenberg-packages", -
trunk/tools/gutenberg/utils.js
r62021 r62052 43 43 44 44 /** 45 * Trigger a fresh download of the Gutenberg artifact by spawning download.js. 46 * Exits the process if the download fails. 45 * Trigger a fresh download of the Gutenberg artifact by spawning download.js, 46 * then run `grunt build:gutenberg --dev` to copy the build to src/. 47 * Exits the process if either step fails. 47 48 */ 48 49 function downloadGutenberg() { 49 const result = spawnSync( 'node', [ path.join( __dirname, 'download.js' ) ], { stdio: 'inherit' } ); 50 if ( result.status !== 0 ) { 51 process.exit( result.status ?? 1 ); 50 const downloadResult = spawnSync( 'node', [ path.join( __dirname, 'download.js' ) ], { stdio: 'inherit' } ); 51 if ( downloadResult.status !== 0 ) { 52 process.exit( downloadResult.status ?? 1 ); 53 } 54 55 const buildResult = spawnSync( 'grunt', [ 'build:gutenberg', '--dev' ], { stdio: 'inherit', shell: true } ); 56 if ( buildResult.status !== 0 ) { 57 process.exit( buildResult.status ?? 1 ); 52 58 } 53 59 }
Note: See TracChangeset
for help on using the changeset viewer.