bump versions RN-> 0.29.2, Clojure/ClojureScript -> 1.8, Reagent -> 0.6.0-rc
- ReactNative server host updates had to be changed for 0.29.2: AppDelegate.m does not have host anymore, RegExp for host in RCTWebSocketExecutor.m had to be changed.
This commit is contained in:
parent
4a2c15f418
commit
fc341e723b
|
@ -28,8 +28,9 @@ 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
|
||||||
serverRx = /http:\/\/[^:]+/g
|
appDelegateRx = /http:\/\/[^:]+/g
|
||||||
rnVersion = '0.27.2'
|
debugHostRx = /host\s+=\s+@".*";/g
|
||||||
|
rnVersion = '0.29.2'
|
||||||
rnPackagerPort = 8081
|
rnPackagerPort = 8081
|
||||||
process.title = 're-natal'
|
process.title = 're-natal'
|
||||||
interfaceConf =
|
interfaceConf =
|
||||||
|
@ -53,7 +54,7 @@ interfaceConf =
|
||||||
android: ["core.cljs"]
|
android: ["core.cljs"]
|
||||||
common: ["handlers.cljs", "subs.cljs", "db.cljs"]
|
common: ["handlers.cljs", "subs.cljs", "db.cljs"]
|
||||||
other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]]
|
other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]]
|
||||||
deps: ['[reagent "0.6.0-alpha2" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]'
|
deps: ['[reagent "0.6.0-rc" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]'
|
||||||
'[re-frame "0.7.0"]'
|
'[re-frame "0.7.0"]'
|
||||||
'[prismatic/schema "1.0.4"]']
|
'[prismatic/schema "1.0.4"]']
|
||||||
shims: ["cljsjs.react", "cljsjs.react.dom", "cljsjs.react.dom.server"]
|
shims: ["cljsjs.react", "cljsjs.react.dom", "cljsjs.react.dom.server"]
|
||||||
|
@ -475,13 +476,14 @@ updateFigwheelUrls = (devEnvRoot, androidHost, iosHost) ->
|
||||||
mainIosDevPath = "#{devEnvRoot}/env/ios/main.cljs"
|
mainIosDevPath = "#{devEnvRoot}/env/ios/main.cljs"
|
||||||
edit mainIosDevPath, [[figwheelUrlRx, "ws://#{iosHost}:"]]
|
edit mainIosDevPath, [[figwheelUrlRx, "ws://#{iosHost}:"]]
|
||||||
|
|
||||||
|
# Current RN version (0.29.2) has no host in AppDelegate.m maybe docs are outdated?
|
||||||
updateIosAppDelegate = (projName, iosHost) ->
|
updateIosAppDelegate = (projName, iosHost) ->
|
||||||
appDelegatePath = "ios/#{projName}/AppDelegate.m"
|
appDelegatePath = "ios/#{projName}/AppDelegate.m"
|
||||||
edit appDelegatePath, [[serverRx, "http://#{iosHost}"]]
|
edit appDelegatePath, [[appDelegateRx, "http://#{iosHost}"]]
|
||||||
|
|
||||||
updateIosRCTWebSocketExecutor = (iosHost) ->
|
updateIosRCTWebSocketExecutor = (iosHost) ->
|
||||||
RCTWebSocketExecutorPath = "node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m"
|
RCTWebSocketExecutorPath = "node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m"
|
||||||
edit RCTWebSocketExecutorPath, [[serverRx, "http://#{iosHost}"]]
|
edit RCTWebSocketExecutorPath, [[debugHostRx, "host = @\"#{iosHost}\";"]]
|
||||||
|
|
||||||
generateDevScripts = () ->
|
generateDevScripts = () ->
|
||||||
try
|
try
|
||||||
|
@ -508,9 +510,9 @@ generateDevScripts = () ->
|
||||||
fs.writeFileSync 'index.android.js', "#{moduleMap}require('figwheel-bridge').withModules(modules).start('#{projName}','android','#{androidDevHost}');"
|
fs.writeFileSync 'index.android.js', "#{moduleMap}require('figwheel-bridge').withModules(modules).start('#{projName}','android','#{androidDevHost}');"
|
||||||
log 'index.android.js was regenerated'
|
log 'index.android.js was regenerated'
|
||||||
|
|
||||||
updateIosAppDelegate(projName, iosDevHost)
|
#updateIosAppDelegate(projName, iosDevHost)
|
||||||
updateIosRCTWebSocketExecutor(iosDevHost)
|
updateIosRCTWebSocketExecutor(iosDevHost)
|
||||||
log "AppDelegate.m and RCTWebSocketExecutor.m were updated"
|
log "Host in 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
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
:url "http://example.com/FIXME"
|
:url "http://example.com/FIXME"
|
||||||
:license {:name "Eclipse Public License"
|
:license {:name "Eclipse Public License"
|
||||||
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
||||||
:dependencies [[org.clojure/clojure "1.7.0"]
|
:dependencies [[org.clojure/clojure "1.8.0"]
|
||||||
[org.clojure/clojurescript "1.7.170"]
|
[org.clojure/clojurescript "1.8.51"]
|
||||||
$INTERFACE_DEPS$]
|
$INTERFACE_DEPS$]
|
||||||
:plugins [[lein-cljsbuild "1.1.1"]
|
:plugins [[lein-cljsbuild "1.1.1"]
|
||||||
[lein-figwheel "0.5.0-6"]]
|
[lein-figwheel "0.5.0-6"]]
|
||||||
|
|
Loading…
Reference in New Issue