WordPress.org

Make WordPress Core

Ticket #45145: fix-jshint-errors-after-43824.2.diff

File fix-jshint-errors-after-43824.2.diff, 1.7 KB (added by atimmer, 3 years ago)
  • Gruntfile.js

     
    11/* jshint node:true */
    22/* globals Set */
    33var webpackConfig = require( './webpack.config' );
    4 const { execSync } = require( 'child_process' );
     4var execSync = require( 'child_process' ).execSync;
    55
    66module.exports = function(grunt) {
    77        var path = require('path'),
     
    1212                BANNER_TEXT = '/*! This file is auto-generated */',
    1313                autoprefixer = require( 'autoprefixer' );
    1414
    15         const packageJson = grunt.file.readJSON( 'package.json' );
     15        var packageJson = grunt.file.readJSON( 'package.json' );
    1616
    1717        // Load tasks.
    1818        require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );
     
    788788        ] );
    789789
    790790        grunt.registerTask( 'download-packages', function() {
    791                 const directory = 'packages';
    792                 const version = packageJson.wordpress.packagesVersion;
     791                var directory = 'packages';
     792                var version = packageJson.wordpress.packagesVersion;
    793793
    794794                if ( ! grunt.file.exists( directory  ) ) {
    795795                        // Clone gutenberg
    796                         execSync( `git clone https://github.com/WordPress/gutenberg.git ${ directory }`, { stdio: 'inherit' } );
     796                        execSync( 'git clone https://github.com/WordPress/gutenberg.git ' + directory, { stdio: 'inherit' } );
    797797                }
    798798
    799799                execSync( 'git fetch --tags', { cwd: directory, stdio: 'inherit' } );
    800800
    801801                // Make sure we are on the correct version of Gutenberg.
    802                 execSync( `git reset --hard ${ version }`, { cwd: directory, stdio: 'inherit' } );
     802                execSync( 'git reset --hard ' + version, { cwd: directory, stdio: 'inherit' } );
    803803
    804804                // Install Gutenberg dependencies and build the packages.
    805805                execSync( 'npm install', { cwd: directory, stdio: 'inherit' } );