mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
Merge pull request #3272 from nsimmons/cli/actually_make_init_backwards_compatible
[cli] make init backwards-compatible for real
This commit is contained in:
commit
441bad6bdd
@ -7,7 +7,7 @@ function init(projectDir, argsOrName) {
|
|||||||
console.log('Setting up new React Native app in ' + projectDir);
|
console.log('Setting up new React Native app in ' + projectDir);
|
||||||
var env = yeoman.createEnv();
|
var env = yeoman.createEnv();
|
||||||
env.register(require.resolve(path.join(__dirname, 'generator')), 'react:app');
|
env.register(require.resolve(path.join(__dirname, 'generator')), 'react:app');
|
||||||
var args = Array.isArray(argsOrName) ? argsOrName : [argsOrName].concat(process.args.slice(4));
|
var args = Array.isArray(argsOrName) ? argsOrName : [argsOrName].concat(process.argv.slice(4));
|
||||||
var generator = env.create('react:app', {args: args});
|
var generator = env.create('react:app', {args: args});
|
||||||
generator.destinationRoot(projectDir);
|
generator.destinationRoot(projectDir);
|
||||||
generator.run();
|
generator.run();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user