Skip to content

Commit d4f125f

Browse files
committed
Build/Test Tools: Pass the V8 flags from the Grunt npm scripts.
Drop the launcher and put `--no-maglev --no-concurrent-sparkplug` in the Grunt npm scripts directly, so Grunt keeps its usual process layout. The Gutenberg download goes through `npm run build:gutenberg`. See #66116.
1 parent c2176c6 commit d4f125f

3 files changed

Lines changed: 9 additions & 73 deletions

File tree

‎package.json‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@
117117
"zod": "3.25.1"
118118
},
119119
"scripts": {
120-
"build": "node ./tools/grunt.js build",
121-
"build:dev": "node ./tools/grunt.js build --dev",
122-
"build:gutenberg": "node ./tools/grunt.js build:gutenberg",
123-
"dev": "node ./tools/grunt.js watch --dev",
124-
"test": "node ./tools/grunt.js test",
125-
"watch": "node ./tools/grunt.js watch",
126-
"grunt": "node ./tools/grunt.js",
120+
"build": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build",
121+
"build:dev": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build --dev",
122+
"build:gutenberg": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build:gutenberg",
123+
"dev": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt watch --dev",
124+
"test": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt test",
125+
"watch": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt watch",
126+
"grunt": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt",
127127
"lint:jsdoc": "wp-scripts lint-js",
128128
"lint:jsdoc:fix": "wp-scripts lint-js --fix",
129129
"typecheck:js": "tsc --build",
@@ -146,6 +146,6 @@
146146
"typecheck:php:baselines": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan:baselines --",
147147
"gutenberg:copy": "node tools/gutenberg/copy.js",
148148
"gutenberg:verify": "node tools/gutenberg/utils.js",
149-
"gutenberg:download": "node tools/gutenberg/download.js && node ./tools/grunt.js build:gutenberg"
149+
"gutenberg:download": "node tools/gutenberg/download.js && npm run build:gutenberg"
150150
}
151151
}

‎tools/grunt.js‎

Lines changed: 0 additions & 60 deletions
This file was deleted.

‎tools/gutenberg/utils.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,7 @@ function downloadGutenberg() {
231231
process.exit( downloadResult.status ?? 1 );
232232
}
233233

234-
const buildResult = spawnSync( process.execPath, [ path.join( __dirname, '../grunt.js' ), 'build:gutenberg' ], { stdio: 'inherit' } );
235-
if ( buildResult.error ) {
236-
console.error( buildResult.error.message );
237-
process.exit( 1 );
238-
}
234+
const buildResult = spawnSync( 'npm', [ 'run', 'build:gutenberg' ], { stdio: 'inherit', shell: true } );
239235
if ( buildResult.status !== 0 ) {
240236
process.exit( buildResult.status ?? 1 );
241237
}

0 commit comments

Comments
 (0)