       dependencies:
         'react-native': rnVersion
     , null, 2
+
     exec 'npm i'
+    exec "
+         node -e
+         \"process.argv[3]='#{projName}';
+         require('react-native/local-cli/init')('.', '#{projName}')\"
+         "
+
+    exec 'rm -rf android'
+    fs.unlinkSync 'index.android.js'
 
     log 'Installing Pod dependencies'
-    process.chdir 'iOS'
+    process.chdir 'ios'
     exec "cp #{resources}Podfile ."
     exec 'pod install'
 


openXcode = (name) ->
  try
    exec "open iOS/iOS/#{name}.xcworkspace"
  catch {message}
    logErr \
      if message.match /ENOENT/i
        """
        Cannot find #{name}.xcworkspace in iOS/iOS.
        Run this command from your project's root directory.
        """
      else if message.match /EACCES/i
        "Invalid permissions for opening #{name}.xcworkspace in iOS/iOS"
      else
        message


cli        = require 'commander'
chalk      = require 'chalk'
semver     = require 'semver'
pkgJson    = require __dirname + '/package.json'

nodeVersion     = pkgJson.engines.node
resources       = __dirname + '/resources/'
camelRx         = /([a-z])([A-Z])/g
projNameRx      = /\$PROJECT_NAME\$/g
projNameHyphRx  = /\$PROJECT_NAME_HYPHENATED\$/g
projNameUnderRx = /\$PROJECT_NAME_UNDERSCORED\$/g
rnVersion       = '0.11.4'
podMinVersion   = '0.38.2'
process.title   = 'natal'

