mirror of
https://github.com/status-im/re-natal.git
synced 2025-01-30 14:24:44 +00:00
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
|
devHostRx = /\$DEV_HOST\$/g
|
||||||
ipAddressRx = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/i
|
ipAddressRx = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/i
|
||||||
figwheelUrlRx = /ws:\/\/[0-9a-zA-Z\.]*:/g
|
figwheelUrlRx = /ws:\/\/[0-9a-zA-Z\.]*:/g
|
||||||
appDelegateRx = /http:\/\/[^:]+/g
|
serverRx = /http:\/\/[^:]+/g
|
||||||
rnVersion = '0.23.1'
|
rnVersion = '0.23.1'
|
||||||
rnPackagerPort = 8081
|
rnPackagerPort = 8081
|
||||||
process.title = 're-natal'
|
process.title = 're-natal'
|
||||||
@ -462,7 +462,11 @@ updateFigwheelUrls = (devEnvRoot, androidHost, iosHost) ->
|
|||||||
|
|
||||||
updateIosAppDelegate = (projName, iosHost) ->
|
updateIosAppDelegate = (projName, iosHost) ->
|
||||||
appDelegatePath = "ios/#{projName}/AppDelegate.m"
|
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 = () ->
|
generateDevScripts = () ->
|
||||||
try
|
try
|
||||||
@ -492,6 +496,9 @@ generateDevScripts = () ->
|
|||||||
updateIosAppDelegate(projName, iosDevHost)
|
updateIosAppDelegate(projName, iosDevHost)
|
||||||
log "AppDelegate.m was updated"
|
log "AppDelegate.m was updated"
|
||||||
|
|
||||||
|
updateIosRCTWebSocketExecutor(iosDevHost)
|
||||||
|
log "RCTWebSocketExecutor.m was updated"
|
||||||
|
|
||||||
updateFigwheelUrls(devEnvRoot, androidDevHost, iosDevHost)
|
updateFigwheelUrls(devEnvRoot, androidDevHost, iosDevHost)
|
||||||
log 'Dev server host for iOS: ' + iosDevHost
|
log 'Dev server host for iOS: ' + iosDevHost
|
||||||
log 'Dev server host for Android: ' + androidDevHost
|
log 'Dev server host for Android: ' + androidDevHost
|
||||||
|
Loading…
x
Reference in New Issue
Block a user