code: async function initCompat(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) {
      logger.error('react-native init requires a project name.');
      return;
    }
  
    const newProjectName = args[0];
    const options = minimist(args);
  
    logger.info(`Setting up new React Native app in ${projectDir}`);
    await generateProject(projectDir, newProjectName, options);
  }
docs: Creates the template for a React Native project given the provided
  parameters:
  @param projectDir Templates will be copied here.
  @param argsOrName Project name or full list of custom arguments
  for the generator.
  @param options Command line options passed from the react-native-cli directly.
  E.g. `{ version: '0.43.0', template: 'navigation' }`