2
0
mirror of https://github.com/status-im/react-native.git synced 2025-01-20 06:18:57 +00:00
2015-08-12 12:04:27 +01:00

18 lines
496 B
JavaScript
Executable File

'use strict';
var path = require('path');
var utils = require('./generator-utils');
var yeoman = require('yeoman-environment');
function init(projectDir, appName) {
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 generator = env.create('react:app', {args: [appName]});
generator.destinationRoot(projectDir);
generator.run();
}
module.exports = init;