Simplify path resolving for react-scripts (#168)

This commit is contained in:
Forbes Lindesay
2016-07-25 12:05:54 +01:00
committed by Dan Abramov
parent 06df2ecb46
commit 9dc23a3484

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
var path = require('path');
var spawn = require('cross-spawn');
var script = process.argv[2];
var args = process.argv.slice(3);
@@ -10,7 +9,7 @@ case 'start':
case 'eject':
spawn(
'node',
[path.resolve(__dirname, '..', 'scripts', script)].concat(args),
[require.resolve('../scripts/' + script)].concat(args),
{stdio: 'inherit'}
);
break;