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' } );