Skip to content

Commit

Permalink
chore: upgrade react-native, npm & lein deps
Browse files Browse the repository at this point in the history
  • Loading branch information
puppybits committed Sep 23, 2018
1 parent a976a59 commit 37a6830
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "re-natal",
"version": "0.9.0",
"description": "Bootstrap ClojureScript React Native apps with reagent and re-frame for iOS and Android",
"description": "Bootstrap ClojureScript React Native apps with reagent, re-frame and om next for iOS and Android",
"main": "index.js",
"author": "Artur Girenko <[email protected]>",
"license": "MIT",
"dependencies": {
"chalk": "^1.1.1",
"chalk": "^2.4.1",
"check-dependencies": "^1.0.1",
"coffeescript": "^1.9.3",
"coffeescript": "^2.3.2",
"commander": "^2.8.1",
"deepmerge": "^1.5.2",
"fs-extra": "^0.26.5",
"deepmerge": "^2.1.1",
"fs-extra": "^7.0.0",
"handlebars": "^4.0.10",
"klaw-sync": "^2.1.0",
"klaw-sync": "^5.0.0",
"semver": "^5.0.1"
},
"engines": {
Expand All @@ -37,7 +37,8 @@
"ios",
"android",
"reagent",
"re-frame"
"re-frame",
"om next"
],
"bugs": {
"url": "https://github.com/drapanjanas/re-natal/issues"
Expand Down
21 changes: 12 additions & 9 deletions re-natal.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ipAddressRx = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/i
debugHostRx = /host]\s+\?:\s+@".*";/g
namespaceRx = /\(ns\s+([A-Za-z0-9.-]+)/g
jsRequireRx = /js\/require "(.+)"/g
rnVersion = '0.55.4'
rnWinVersion = '0.55.0-rc.0'
rnVersion = '0.57.0'
rnWinVersion = '0.57.0'
rnPackagerPort = 8081
process.title = 're-natal'
buildProfiles =
Expand Down Expand Up @@ -65,7 +65,7 @@ interfaceConf =
common: ["events.cljs", "subs.cljs", "db.cljs"]
other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]]
deps: ['[reagent "0.8.1" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server cljsjs/create-react-class]]'
'[re-frame "0.10.5"]']
'[re-frame "0.10.6"]']
shims: []
sampleCommandNs: '(in-ns \'$PROJECT_NAME_HYPHENATED$.ios.core)'
sampleCommand: '(dispatch [:set-greeting "Hello Native World!"])'
Expand All @@ -74,7 +74,7 @@ interfaceConf =
sources:
common: ["state.cljs"]
other: [["support.cljs","re_natal/support.cljs"]]
deps: ['[org.omcljs/om "1.0.0-beta3" :exclusions [cljsjs/react cljsjs/react-dom]]']
deps: ['[org.omcljs/om "1.0.0-beta4" :exclusions [cljsjs/react cljsjs/react-dom]]']
shims: ["cljsjs.react", "cljsjs.react.dom"]
sampleCommandNs: '(in-ns \'$PROJECT_NAME_HYPHENATED$.state)'
sampleCommand: '(swap! app-state assoc :app/msg "Hello Native World!")'
Expand Down Expand Up @@ -131,7 +131,7 @@ ensureExecutableAvailable = (executable) ->
exec "type #{executable}"

isYarnAvailable = () ->
false
exec 'yarn -v'

isSomeDepsMissing = () ->
depState = ckDeps.sync {install: false, verbose: false}
Expand Down Expand Up @@ -559,10 +559,13 @@ init = (interfaceName, projName, platforms) ->
private: true
scripts:
start: 'node node_modules/react-native/local-cli/cli.js start'
'run-ios': 'node node_modules/react-native/local-cli/cli.js run-ios',
'run-android': 'node node_modules/react-native/local-cli/cli.js run-android',
dependencies:
'react-native': rnVersion
# Fixes issue with packager 'TimeoutError: transforming ... took longer than 301 seconds.'
'babel-plugin-transform-es2015-block-scoping': '6.15.0'
'@babel/plugin-external-helpers': '^7.0.0'
devDependencies:
'metro-react-native-babel-preset': '0.45.4'

if 'windows' in platforms || 'wpf' in platforms
pkg.dependencies['react-native-windows'] = rnWinVersion
Expand Down Expand Up @@ -596,7 +599,7 @@ init = (interfaceName, projName, platforms) ->
log "cd #{projNameHyph}", 'inverse'
log ''
log 'Run iOS app:' , 'yellow'
log 'react-native run-ios > /dev/null', 'inverse'
log 'react-native run-ios --configuration Debug > /dev/null', 'inverse'
log ''
log 'To use figwheel type:' , 'yellow'
log 're-natal use-figwheel', 'inverse'
Expand Down Expand Up @@ -768,7 +771,7 @@ generateDevScripts = () ->

for platform in platforms
moduleMap = generateRequireModulesCode(platformModulesAndImages(config, platform))
fs.writeFileSync "index.#{platform}.js", "#{moduleMap}require('figwheel-bridge').withModules(modules).start('#{projName}','#{platform}','#{devHost[platform]}');"
fs.writeFileSync "index.#{platform}.js", "#{moduleMap}require('./figwheel-bridge').withModules(modules).start('#{projName}','#{platform}','#{devHost[platform]}');"
log "index.#{platform}.js was regenerated"

updateIosRCTWebSocketExecutor(devHost.ios)
Expand Down
10 changes: 5 additions & 5 deletions resources/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.238"]
[org.clojure/clojurescript "1.10.339"]
$INTERFACE_DEPS$]
:plugins [[lein-cljsbuild "1.1.4"]
[lein-figwheel "0.5.14"]]
[lein-figwheel "0.5.16"]]
:clean-targets ["target/" #_($PLATFORM_CLEAN$)]
:aliases {"prod-build" ^{:doc "Recompile code with prod profile."}
["do" "clean"
Expand All @@ -16,14 +16,14 @@
["do" "clean"
["with-profile" "advanced" "cljsbuild" "once"]]}
:jvm-opts ["-XX:+IgnoreUnrecognizedVMOptions" "--add-modules=java.xml.bind"]
:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.14"]
[com.cemerick/piggieback "0.2.1"]]
:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.16"]
[com.cemerick/piggieback "0.2.2"]]
:source-paths ["src" "env/dev"]
:cljsbuild {:builds [
#_($DEV_PROFILES$)]}
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}
:prod {:cljsbuild {:builds [
#_($PROD_PROFILES$)]}}
:advanced {:dependencies [[react-native-externs "0.1.0"]]
:advanced {:dependencies [[react-native-externs "0.2.0"]]
:cljsbuild {:builds [
#_($ADVANCED_PROFILES$)]}}})

0 comments on commit 37a6830

Please sign in to comment.