ES6 syntax (#2213)

This commit is contained in:
Danil Shashkov
2017-05-18 23:05:46 +05:00
committed by Dan Abramov
parent 07c75aa5fd
commit 5f93bc4d55
3 changed files with 15 additions and 20 deletions

View File

@@ -10,16 +10,16 @@
'use strict';
var spawn = require('cross-spawn');
var script = process.argv[2];
var args = process.argv.slice(3);
const spawn = require('cross-spawn');
const script = process.argv[2];
const args = process.argv.slice(3);
switch (script) {
case 'build':
case 'eject':
case 'start':
case 'test':
var result = spawn.sync(
case 'test': {
const result = spawn.sync(
'node',
[require.resolve('../scripts/' + script)].concat(args),
{ stdio: 'inherit' }
@@ -42,6 +42,7 @@ switch (script) {
}
process.exit(result.status);
break;
}
default:
console.log('Unknown script "' + script + '".');
console.log('Perhaps you need to update react-scripts?');