Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically sync stable blocks from Gutenberg to wordpress-develop on release #2647

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run sync-stable-blocks by requiring the main function
  • Loading branch information
adamziel committed Jun 16, 2022
commit cfdd14f3f18fd3a770f3408557f23f52ab4b246a
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ module.exports = function(grunt) {

grunt.registerTask( 'wp-packages:sync-stable-blocks', 'Refresh the PHP files referring to stable @wordpress/block-library blocks.', function() {
grunt.log.writeln( `Syncing stable blocks from @wordpress/block-library to src/` );
const { main } = require( 'tools/release/sync-stable-blocks.js' );
const { main } = require( __dirname + '/tools/release/sync-stable-blocks' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we can't use?

Suggested change
const { main } = require( __dirname + '/tools/release/sync-stable-blocks' );
const { main } = require( './tools/release/sync-stable-blocks' );

Is there also any reason why it has to be required dynamically rather than in the header of the file?

main();
} );

Expand Down