mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 03:26:07 +00:00
Respect projectName on template creation
This commit is contained in:
parent
4fd0a2de0d
commit
575e9b7b9a
@ -3,11 +3,10 @@
|
||||
var path = require('path');
|
||||
var yeoman = require('yeoman-environment');
|
||||
|
||||
function init(projectDir, appName) {
|
||||
function init(projectDir, args) {
|
||||
console.log('Setting up new React Native app in ' + projectDir);
|
||||
var env = yeoman.createEnv();
|
||||
env.register(require.resolve(path.join(__dirname, 'generator')), 'react:app');
|
||||
var args = process.argv.slice(3);
|
||||
var generator = env.create('react:app', {args: args});
|
||||
generator.destinationRoot(projectDir);
|
||||
generator.run();
|
||||
|
3
react-native-cli/index.js
vendored
3
react-native-cli/index.js
vendored
@ -144,8 +144,9 @@ function createProject(name) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var args = [projectName].concat(process.argv.slice(4));
|
||||
cli = require(CLI_MODULE_PATH());
|
||||
cli.init(root, projectName);
|
||||
cli.init(root, args);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user