docs: function init(projectDir, argsOrName) {
    const args = Array.isArray(argsOrName)
      ? argsOrName // argsOrName was e.g. ['AwesomeApp', '--verbose']
      : [argsOrName].concat(process.argv.slice(4)); // argsOrName was e.g. 'AwesomeApp'
  
    // args array is e.g. ['AwesomeApp', '--verbose', '--template', 'navigation']
    if (!args || args.length === 0) {
      console.error('react-native init requires a project name.');
      return;
    }
  
    const newProjectName = args[0];
    const options = minimist(args);
  
    if (listTemplatesAndExit(newProjectName, options)) {
      // Just listing templates using 'react-native init --template'
      // Not creating a new app.
      return;
    } else {
      console.log('Setting up new React Native app in ' + projectDir);
      generateProject(projectDir, newProjectName, options);
    }
  }