2019-09-07 12:57:22 +00:00
|
|
|
;; shadow-cljs configuration
|
|
|
|
{:source-paths ["src" "test/cljs"]
|
|
|
|
|
2020-05-03 14:14:02 +00:00
|
|
|
:dependencies [[org.clojure/core.async "1.1.587"]
|
2021-03-08 14:21:59 +00:00
|
|
|
[reagent "1.0.0"]
|
2019-09-07 12:57:22 +00:00
|
|
|
[re-frame "0.12.0"]
|
|
|
|
[binaryage/oops "0.7.0"]
|
|
|
|
[com.andrewmcveigh/cljs-time "0.5.2"]
|
|
|
|
[status-im/timbre "4.10.0-2-status"]
|
2020-05-03 14:14:02 +00:00
|
|
|
[com.taoensso/encore "2.105.0"]
|
2019-09-07 12:57:22 +00:00
|
|
|
[hickory "0.7.1"]
|
|
|
|
[cljs-bean "1.3.0"]
|
|
|
|
[com.cognitect/transit-cljs "0.8.248"]
|
|
|
|
[mvxcvi/alphabase "1.0.0"]
|
|
|
|
;; dev dependencies
|
|
|
|
[refactor-nrepl "2.5.0"]
|
2020-09-01 08:21:20 +00:00
|
|
|
[cider/cider-nrepl "0.25.3"]
|
2019-09-07 12:57:22 +00:00
|
|
|
[cider/piggieback "0.4.1"]
|
2022-05-20 10:31:54 +00:00
|
|
|
[re-frisk-remote "1.6.0"]
|
2020-07-30 09:39:55 +00:00
|
|
|
;; routing
|
|
|
|
[bidi "2.1.6"]
|
2019-09-07 12:57:22 +00:00
|
|
|
;; test dependencies
|
|
|
|
[day8.re-frame/test "0.1.5"]
|
2021-03-01 14:36:59 +00:00
|
|
|
[com.taoensso/tufte "2.1.0"]
|
|
|
|
;; linting
|
|
|
|
[cljfmt/cljfmt "0.6.7"]]
|
2019-09-07 12:57:22 +00:00
|
|
|
|
|
|
|
;; port and middleware for repl in development
|
|
|
|
:nrepl {:port 7888
|
|
|
|
:middleware [cider.piggieback/wrap-cljs-repl
|
|
|
|
refactor-nrepl.middleware/wrap-refactor]}
|
|
|
|
|
|
|
|
;; shadow-cljs web interface
|
|
|
|
:http {:port 3449
|
|
|
|
:host "0.0.0.0"}
|
|
|
|
|
2020-05-14 13:00:06 +00:00
|
|
|
:cache-blockers #{status-im.utils.js-resources status-im.ui.components.icons.icons}
|
2020-05-05 05:43:55 +00:00
|
|
|
|
2020-05-14 11:58:05 +00:00
|
|
|
:builds {:mobile
|
2019-09-07 12:57:22 +00:00
|
|
|
{:target :react-native
|
|
|
|
:output-dir "app"
|
2020-05-14 11:58:05 +00:00
|
|
|
:init-fn status-im.core/init
|
2022-08-26 20:59:23 +00:00
|
|
|
;; When false, the Shadow-CLJS watcher won't automatically refresh
|
|
|
|
;; the target files (a.k.a hot reload). When false, you can manually
|
|
|
|
;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`.
|
|
|
|
:devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]}
|
2020-05-03 14:14:02 +00:00
|
|
|
:dev {:devtools {:after-load status-im.reloader/reload
|
2020-07-09 10:13:28 +00:00
|
|
|
:build-notify status-im.reloader/build-notify
|
2020-05-03 14:14:02 +00:00
|
|
|
:preloads [re-frisk-remote.preload]}
|
2022-08-04 08:20:44 +00:00
|
|
|
:closure-defines
|
2022-10-19 14:59:55 +00:00
|
|
|
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
|
2022-08-04 08:20:44 +00:00
|
|
|
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
|
2020-07-09 10:13:28 +00:00
|
|
|
:compiler-options {:output-feature-set :es5
|
|
|
|
:closure-defines
|
2020-05-13 12:56:14 +00:00
|
|
|
{re-frame.trace/trace-enabled? true}
|
2020-07-09 10:13:28 +00:00
|
|
|
:source-map false
|
|
|
|
:infer-externs true}
|
2019-09-07 12:57:22 +00:00
|
|
|
;; if you want to use a real device, set your local ip
|
|
|
|
;; in the SHADOW_HOST env variable to make sure that
|
|
|
|
;; it will use the right interface
|
|
|
|
:local-ip #shadow/env "SHADOW_HOST"}
|
2021-02-12 14:58:43 +00:00
|
|
|
:chunks {:fleets status-im.fleet.default-fleet/default-fleets
|
2020-07-10 09:23:52 +00:00
|
|
|
:chats status-im.chat.default-chats/default-chats}
|
2022-08-04 08:20:44 +00:00
|
|
|
:release
|
|
|
|
{:closure-defines
|
2022-10-19 14:59:55 +00:00
|
|
|
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
|
2022-08-04 08:20:44 +00:00
|
|
|
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
|
2020-10-05 10:00:37 +00:00
|
|
|
:compiler-options {:output-feature-set :es6
|
2019-09-07 12:57:22 +00:00
|
|
|
;;disable for android build as there
|
|
|
|
;;is an intermittent warning with deftype
|
|
|
|
:warnings-as-errors false
|
|
|
|
:infer-externs :auto
|
|
|
|
:static-fns true
|
|
|
|
:fn-invoke-direct true
|
|
|
|
:optimizations :advanced
|
2022-05-16 09:28:03 +00:00
|
|
|
:js-options {:js-provider :closure}}}}
|
2019-09-07 12:57:22 +00:00
|
|
|
;; the tests are ran with node, react-native dependencies are mocked
|
|
|
|
;; by using node --require override.js, which uses the node-library
|
|
|
|
;; produced by the target :mocks below and redefines node require
|
|
|
|
;; function to use the mocks instead of the rn libraries
|
|
|
|
:test
|
2022-08-03 14:14:20 +00:00
|
|
|
{:output-to "target/test/test.js"
|
|
|
|
:output-dir "target/test"
|
|
|
|
:optimizations :simple
|
|
|
|
:target :node-test
|
|
|
|
:main status-im.test-runner/main
|
|
|
|
;; set :ui-driven to true to let shadow-cljs inject node-repl
|
|
|
|
:ui-driven true
|
2022-08-04 08:20:44 +00:00
|
|
|
:closure-defines
|
2022-10-19 14:59:55 +00:00
|
|
|
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
|
2022-08-04 08:20:44 +00:00
|
|
|
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
|
2019-09-07 12:57:22 +00:00
|
|
|
:compiler-options {;; needed because we override require and it
|
|
|
|
;; messes with source-map which reports callstack
|
|
|
|
;; exceeded exceptions instead of real issues
|
2022-08-03 14:14:20 +00:00
|
|
|
:source-map false
|
2019-09-07 12:57:22 +00:00
|
|
|
;; needed because we use deref in tests
|
2022-08-03 14:14:20 +00:00
|
|
|
:static-fns false
|
2022-09-05 10:52:39 +00:00
|
|
|
:optimizations :simple
|
|
|
|
:infer-externs true}}
|
2019-09-07 12:57:22 +00:00
|
|
|
|
|
|
|
;; mock.js-dependencies is mocking the react-native libraries
|
|
|
|
;; we build it as a node library so that it can be required by
|
|
|
|
;; override.js
|
|
|
|
:mocks
|
|
|
|
{:target :node-library
|
|
|
|
:exports {:mocks mocks.js-dependencies/mock}
|
|
|
|
:output-to "target/mocks/mocks.js"
|
|
|
|
:output-dir "target/mocks"
|
|
|
|
:compiler-options {:optimizations :simple
|
|
|
|
:source-map false}}}}
|