Ticket #45145: fix-jshint-errors-after-43824.2.diff
File fix-jshint-errors-after-43824.2.diff, 1.7 KB (added by , 6 years ago) |
---|
-
Gruntfile.js
1 1 /* jshint node:true */ 2 2 /* globals Set */ 3 3 var webpackConfig = require( './webpack.config' ); 4 const { execSync } = require( 'child_process' );4 var execSync = require( 'child_process' ).execSync; 5 5 6 6 module.exports = function(grunt) { 7 7 var path = require('path'), … … 12 12 BANNER_TEXT = '/*! This file is auto-generated */', 13 13 autoprefixer = require( 'autoprefixer' ); 14 14 15 constpackageJson = grunt.file.readJSON( 'package.json' );15 var packageJson = grunt.file.readJSON( 'package.json' ); 16 16 17 17 // Load tasks. 18 18 require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks ); … … 788 788 ] ); 789 789 790 790 grunt.registerTask( 'download-packages', function() { 791 constdirectory = 'packages';792 constversion = packageJson.wordpress.packagesVersion;791 var directory = 'packages'; 792 var version = packageJson.wordpress.packagesVersion; 793 793 794 794 if ( ! grunt.file.exists( directory ) ) { 795 795 // 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' } ); 797 797 } 798 798 799 799 execSync( 'git fetch --tags', { cwd: directory, stdio: 'inherit' } ); 800 800 801 801 // 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' } ); 803 803 804 804 // Install Gutenberg dependencies and build the packages. 805 805 execSync( 'npm install', { cwd: directory, stdio: 'inherit' } );