Skip to content

Commit

Permalink
Make browserlist:update opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Apr 29, 2022
1 parent 9036fe7 commit d112751
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1216,20 +1216,22 @@ module.exports = function(grunt) {
'qunit:compiled'
] );

grunt.registerTask( 'sync-gutenberg-packages', [
// Required for the build:
'browserslist:update',
grunt.registerTask( 'sync-gutenberg-packages', function() {
if ( grunt.option( 'update-browserlist' ) ) {
// Required for the build:
grunt.task.run( 'browserslist:update' );
}

// Install the latest version of the packages already listed in package.json.
'wp-packages:update',
grunt.task.run( 'wp-packages:update' );

// Install any new @wordpress packages that are now required.
// Update any non-@wordpress deps to the same version as required in the @wordpress packages (e.g. react 16 -> 17).
'wp-packages:refresh-deps',
grunt.task.run( 'wp-packages:refresh-deps' );

// Build the files stored in the src/ directory.
'build:dev'
] );
grunt.task.run( 'build:dev' );
} );

grunt.renameTask( 'watch', '_watch' );

Expand Down

0 comments on commit d112751

Please sign in to comment.