From 2d74b7157cea3caa81691e7e547cb0821950278d Mon Sep 17 00:00:00 2001 From: Anton Timmermans Date: Thu, 25 Oct 2018 15:22:12 +0000 Subject: [PATCH] Build tools: Fix build after [43824]. Props omarreiss. See #45145. git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43826 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 35ee220bde..bf587bfdd5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ /* jshint node:true */ /* globals Set */ var webpackConfig = require( './webpack.config' ); -const { execSync } = require( 'child_process' ); +var execSync = require( 'child_process' ).execSync; module.exports = function(grunt) { var path = require('path'), @@ -12,7 +12,7 @@ module.exports = function(grunt) { BANNER_TEXT = '/*! This file is auto-generated */', autoprefixer = require( 'autoprefixer' ); - const packageJson = grunt.file.readJSON( 'package.json' ); + var packageJson = grunt.file.readJSON( 'package.json' ); // Load tasks. require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks ); @@ -788,18 +788,18 @@ module.exports = function(grunt) { ] ); grunt.registerTask( 'download-packages', function() { - const directory = 'packages'; - const version = packageJson.wordpress.packagesVersion; + var directory = 'packages'; + var version = packageJson.wordpress.packagesVersion; if ( ! grunt.file.exists( directory ) ) { // Clone gutenberg - execSync( `git clone https://github.com/WordPress/gutenberg.git ${ directory }`, { stdio: 'inherit' } ); + execSync( 'git clone https://github.com/WordPress/gutenberg.git ' + directory, { stdio: 'inherit' } ); } execSync( 'git fetch --tags', { cwd: directory, stdio: 'inherit' } ); // Make sure we are on the correct version of Gutenberg. - execSync( `git reset --hard ${ version }`, { cwd: directory, stdio: 'inherit' } ); + execSync( 'git reset --hard ' + version, { cwd: directory, stdio: 'inherit' } ); // Install Gutenberg dependencies and build the packages. execSync( 'npm install', { cwd: directory, stdio: 'inherit' } );