Merge pull request #40 from vikeri/patch-1
Updated use-figwheel to replace debug url
This commit is contained in:
commit
90b633c058
|
@ -28,7 +28,7 @@ platformRx = /\$PLATFORM\$/g
|
|||
devHostRx = /\$DEV_HOST\$/g
|
||||
ipAddressRx = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/i
|
||||
figwheelUrlRx = /ws:\/\/[0-9a-zA-Z\.]*:/g
|
||||
appDelegateRx = /http:\/\/[^:]+/g
|
||||
serverRx = /http:\/\/[^:]+/g
|
||||
rnVersion = '0.23.1'
|
||||
rnPackagerPort = 8081
|
||||
process.title = 're-natal'
|
||||
|
@ -462,7 +462,11 @@ updateFigwheelUrls = (devEnvRoot, androidHost, iosHost) ->
|
|||
|
||||
updateIosAppDelegate = (projName, iosHost) ->
|
||||
appDelegatePath = "ios/#{projName}/AppDelegate.m"
|
||||
edit appDelegatePath, [[appDelegateRx, "http://#{iosHost}"]]
|
||||
edit appDelegatePath, [[serverRx, "http://#{iosHost}"]]
|
||||
|
||||
updateIosRCTWebSocketExecutor = (iosHost) ->
|
||||
RCTWebSocketExecutorPath = "node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m"
|
||||
edit RCTWebSocketExecutorPath, [[serverRx, "http://#{iosHost}"]]
|
||||
|
||||
generateDevScripts = () ->
|
||||
try
|
||||
|
@ -492,6 +496,9 @@ generateDevScripts = () ->
|
|||
updateIosAppDelegate(projName, iosDevHost)
|
||||
log "AppDelegate.m was updated"
|
||||
|
||||
updateIosRCTWebSocketExecutor(iosDevHost)
|
||||
log "RCTWebSocketExecutor.m was updated"
|
||||
|
||||
updateFigwheelUrls(devEnvRoot, androidDevHost, iosDevHost)
|
||||
log 'Dev server host for iOS: ' + iosDevHost
|
||||
log 'Dev server host for Android: ' + androidDevHost
|
||||
|
|
Loading…
Reference in New Issue