diff --git a/Gruntfile.js b/Gruntfile.js index dddc595d2e29d..821046a4c86c6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2063,9 +2063,19 @@ module.exports = function(grunt) { ] ); grunt.registerTask( 'build', function() { + var done = this.async(); + + grunt.util.spawn( { + grunt: true, + args: [ 'clean', '--dev' ], + opts: { stdio: 'inherit' } + }, function( buildError ) { + done( ! buildError ); + } ); + if ( grunt.option( 'dev' ) ) { grunt.task.run( [ - 'gutenberg:verify', + 'gutenberg:download', 'build:js', 'build:css', 'build:codemirror', @@ -2075,7 +2085,7 @@ module.exports = function(grunt) { ] ); } else { grunt.task.run( [ - 'gutenberg:verify', + 'gutenberg:download', 'build:certificates', 'build:files', 'build:js',