generateConfig()
This commit is contained in:
parent
262f8cc5e6
commit
0a2cea3719
18
natal.coffee
18
natal.coffee
|
@ -104,6 +104,16 @@ ensureFreePort = (cb) ->
|
||||||
cb()
|
cb()
|
||||||
|
|
||||||
|
|
||||||
|
generateConfig = (name) ->
|
||||||
|
log 'Creating Natal config'
|
||||||
|
config =
|
||||||
|
name: name
|
||||||
|
device: getUuidForDevice 'iPhone 6s'
|
||||||
|
|
||||||
|
writeConfig config
|
||||||
|
config
|
||||||
|
|
||||||
|
|
||||||
writeConfig = (config) ->
|
writeConfig = (config) ->
|
||||||
try
|
try
|
||||||
fs.writeFileSync '.natal', JSON.stringify config, null, 2
|
fs.writeFileSync '.natal', JSON.stringify config, null, 2
|
||||||
|
@ -299,14 +309,8 @@ init = (projName, interfaceName) ->
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
log 'Creating Natal config'
|
|
||||||
process.chdir '../..'
|
process.chdir '../..'
|
||||||
config =
|
launch generateConfig projName
|
||||||
name: projName
|
|
||||||
device: pluckUuid getDeviceList().find (line) -> /iPhone 6/.test line
|
|
||||||
|
|
||||||
writeConfig config
|
|
||||||
launch config
|
|
||||||
|
|
||||||
log ''
|
log ''
|
||||||
log 'To get started with your new app, first cd into its directory:', 'yellow'
|
log 'To get started with your new app, first cd into its directory:', 'yellow'
|
||||||
|
|
Loading…
Reference in New Issue