fix regex for patching debugger host in RCTWebSocketExecutor.m fixes #132

This commit is contained in:
Artur Girenko 2017-09-24 15:56:27 +02:00
parent 49f34df468
commit 0a01a2743b
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ 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
debugHostRx = /host\s+=\s+@".*";/g
debugHostRx = /host]\s+\?:\s+@".*";/g
rnVersion = '0.47.1'
rnWinVersion = '0.47.0-rc.5'
rnPackagerPort = 8081
@ -678,7 +678,7 @@ updateIosAppDelegate = (projName, iosHost) ->
updateIosRCTWebSocketExecutor = (iosHost) ->
RCTWebSocketExecutorPath = "node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m"
edit RCTWebSocketExecutorPath, [[debugHostRx, "host = @\"#{iosHost}\";"]]
edit RCTWebSocketExecutorPath, [[debugHostRx, "host] ?: @\"#{iosHost}\";"]]
platformModulesAndImages = (config, platform) ->
images = scanImages(config.imageDirs).map (fname) -> './' + fname;