mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-23 22:08:46 +00:00
Upgraded figwheel/cljsbuild.
This commit is contained in:
parent
6669f79c44
commit
bd80c814c9
15
env/dev/user.clj
vendored
15
env/dev/user.clj
vendored
@ -24,9 +24,6 @@
|
|||||||
(def cljs-builds
|
(def cljs-builds
|
||||||
(get-in profiles [:dev :cljsbuild :builds]))
|
(get-in profiles [:dev :cljsbuild :builds]))
|
||||||
|
|
||||||
(def buids-by-id
|
|
||||||
(into {} (map (fn [{:keys [id] :as build}] [id build]) cljs-builds)))
|
|
||||||
|
|
||||||
(defn start-figwheel
|
(defn start-figwheel
|
||||||
"Start figwheel for one or more builds"
|
"Start figwheel for one or more builds"
|
||||||
[build-ids cljs-builds]
|
[build-ids cljs-builds]
|
||||||
@ -62,16 +59,18 @@
|
|||||||
(defn get-builds [ids all-builds]
|
(defn get-builds [ids all-builds]
|
||||||
(keep
|
(keep
|
||||||
(fn [id]
|
(fn [id]
|
||||||
(let [build (get all-builds (get-id id))]
|
(assoc
|
||||||
(if (test-id? id)
|
(let [build (get all-builds (get-id id))]
|
||||||
(get-test-build build)
|
(if (test-id? id)
|
||||||
build)))
|
(get-test-build build)
|
||||||
|
build))
|
||||||
|
:id id))
|
||||||
ids))
|
ids))
|
||||||
|
|
||||||
(let [env-build-ids (System/getenv "BUILD_IDS")
|
(let [env-build-ids (System/getenv "BUILD_IDS")
|
||||||
build-ids (if env-build-ids
|
build-ids (if env-build-ids
|
||||||
(map keyword (s/split env-build-ids #","))
|
(map keyword (s/split env-build-ids #","))
|
||||||
[:android])
|
[:android])
|
||||||
builds (get-builds build-ids buids-by-id)]
|
builds (get-builds build-ids cljs-builds)]
|
||||||
(start-figwheel build-ids builds)
|
(start-figwheel build-ids builds)
|
||||||
(rfs/-main))
|
(rfs/-main))
|
||||||
|
@ -220,7 +220,7 @@ function loadApp(platform, devHost, onLoadCb) {
|
|||||||
// seriously React packager? why.
|
// seriously React packager? why.
|
||||||
var googreq = goog.require;
|
var googreq = goog.require;
|
||||||
|
|
||||||
googreq('figwheel.connect.' + platform);
|
googreq('figwheel.connect.build_' + platform);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
93
project.clj
93
project.clj
@ -12,8 +12,8 @@
|
|||||||
[tailrecursion/cljs-priority-map "1.2.0"]
|
[tailrecursion/cljs-priority-map "1.2.0"]
|
||||||
[com.taoensso/timbre "4.7.4"]
|
[com.taoensso/timbre "4.7.4"]
|
||||||
[com.google.guava/guava "21.0"]]
|
[com.google.guava/guava "21.0"]]
|
||||||
:plugins [[lein-cljsbuild "1.1.4"]
|
:plugins [[lein-cljsbuild "1.1.6"]
|
||||||
[lein-figwheel "0.5.8"]
|
[lein-figwheel "0.5.11"]
|
||||||
[lein-re-frisk "0.4.7"]
|
[lein-re-frisk "0.4.7"]
|
||||||
[rasom/lein-externs "0.1.7"]]
|
[rasom/lein-externs "0.1.7"]]
|
||||||
:clean-targets ["target/" "index.ios.js" "index.android.js"]
|
:clean-targets ["target/" "index.ios.js" "index.android.js"]
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"test" ["doo" "phantom" "test" "once"]}
|
"test" ["doo" "phantom" "test" "once"]}
|
||||||
:test-paths ["test/clj"]
|
:test-paths ["test/clj"]
|
||||||
:figwheel {:nrepl-port 7888}
|
:figwheel {:nrepl-port 7888}
|
||||||
:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.8"]
|
:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.11"]
|
||||||
[re-frisk-remote "0.4.2"]
|
[re-frisk-remote "0.4.2"]
|
||||||
[re-frisk-sidecar "0.4.5"]
|
[re-frisk-sidecar "0.4.5"]
|
||||||
[com.cemerick/piggieback "0.2.1"]
|
[com.cemerick/piggieback "0.2.1"]
|
||||||
@ -33,48 +33,49 @@
|
|||||||
[hawk "0.2.10"]]
|
[hawk "0.2.10"]]
|
||||||
:plugins [[lein-doo "0.1.7"]]
|
:plugins [[lein-doo "0.1.7"]]
|
||||||
:source-paths ["src" "env/dev"]
|
:source-paths ["src" "env/dev"]
|
||||||
:cljsbuild {:builds [{:id :ios
|
:cljsbuild {:builds
|
||||||
:source-paths ["src" "env/dev"]
|
{:ios
|
||||||
:figwheel true
|
{:source-paths ["src" "env/dev"]
|
||||||
:compiler {:output-to "target/ios/app.js"
|
:figwheel true
|
||||||
:main "env.ios.main"
|
:compiler {:output-to "target/ios/app.js"
|
||||||
:output-dir "target/ios"
|
:main "env.ios.main"
|
||||||
:optimizations :none}}
|
:output-dir "target/ios"
|
||||||
{:id :android
|
:optimizations :none}}
|
||||||
:source-paths ["src" "env/dev"]
|
:android
|
||||||
:figwheel true
|
{:source-paths ["src" "env/dev"]
|
||||||
:compiler {:output-to "target/android/app.js"
|
:figwheel true
|
||||||
:main "env.android.main"
|
:compiler {:output-to "target/android/app.js"
|
||||||
:output-dir "target/android"
|
:main "env.android.main"
|
||||||
:optimizations :none}}
|
:output-dir "target/android"
|
||||||
{:id "test"
|
:optimizations :none}}
|
||||||
:source-paths ["src" "test/cljs"]
|
:test
|
||||||
:compiler
|
{:source-paths ["src" "test/cljs"]
|
||||||
{:main status-im.test.runner
|
:compiler {:main status-im.test.runner
|
||||||
:output-to "target/test/test.js"
|
:output-to "target/test/test.js"
|
||||||
:output-dir "target"
|
:output-dir "target"
|
||||||
:optimizations :none}}]}
|
:optimizations :none}}}}
|
||||||
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]
|
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]
|
||||||
:timeout 240000}}
|
:timeout 240000}}
|
||||||
:prod {:cljsbuild {:builds [{:id "ios"
|
:prod {:cljsbuild {:builds
|
||||||
:source-paths ["src" "env/prod"]
|
{:ios
|
||||||
:compiler {:output-to "index.ios.js"
|
{:source-paths ["src" "env/prod"]
|
||||||
:main "env.ios.main"
|
:compiler {:output-to "index.ios.js"
|
||||||
:output-dir "target/ios-prod"
|
:main "env.ios.main"
|
||||||
:static-fns true
|
:output-dir "target/ios-prod"
|
||||||
:optimize-constants true
|
:static-fns true
|
||||||
:optimizations :advanced
|
:optimize-constants true
|
||||||
:externs ["externs/externs.js"]
|
:optimizations :advanced
|
||||||
:closure-defines {"goog.DEBUG" false}
|
:externs ["externs/externs.js"]
|
||||||
:parallel-build true}}
|
:closure-defines {"goog.DEBUG" false}
|
||||||
{:id "android"
|
:parallel-build true}}
|
||||||
:source-paths ["src" "env/prod"]
|
:android
|
||||||
:compiler {:output-to "index.android.js"
|
{:source-paths ["src" "env/prod"]
|
||||||
:main "env.android.main"
|
:compiler {:output-to "index.android.js"
|
||||||
:output-dir "target/android-prod"
|
:main "env.android.main"
|
||||||
:static-fns true
|
:output-dir "target/android-prod"
|
||||||
:optimize-constants true
|
:static-fns true
|
||||||
:optimizations :advanced
|
:optimize-constants true
|
||||||
:externs ["externs/externs.js"]
|
:optimizations :advanced
|
||||||
:closure-defines {"goog.DEBUG" false}
|
:externs ["externs/externs.js"]
|
||||||
:parallel-build true}}]}}})
|
:closure-defines {"goog.DEBUG" false}
|
||||||
|
:parallel-build true}}}}}})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user