2017-10-04 22:09:51 +02:00
(ns ^:figwheel-no-load env.$PLATFORM$.main
2016-01-09 23:35:40 +01:00
(:require [reagent.core :as r]
[$PROJECT_NAME_HYPHENATED$.$PLATFORM$.core :as core]
2017-10-08 18:56:30 +02:00
[figwheel.client :as fw]
[env.config :as conf]))
2015-11-27 23:57:14 +01:00
2017-10-04 22:09:51 +02:00
(enable-console-print!)
2015-11-27 23:57:14 +01:00
2017-09-22 20:07:17 -04:00
(assert (exists? core/init) "Fatal Error - Your core.cljs file doesn't define an 'init' function!!! - Perhaps there was a compilation failure?")
(assert (exists? core/app-root) "Fatal Error - Your core.cljs file doesn't define an 'app-root' function!!! - Perhaps there was a compilation failure?")
2016-01-09 23:35:40 +01:00
(def cnt (r/atom 0))
(defn reloader [] @cnt [core/app-root])
2017-05-30 20:09:51 +02:00
;; Do not delete, root-el is used by the figwheel-bridge.js
2016-01-09 23:35:40 +01:00
(def root-el (r/as-element [reloader]))
2017-10-04 22:09:51 +02:00
(fw/start {
2017-10-08 18:56:30 +02:00
:websocket-url (:$PLATFORM$ conf/figwheel-urls)
2017-10-04 22:09:51 +02:00
:heads-up-display false
:jsload-callback #(swap! cnt inc)})
2015-11-27 23:57:14 +01:00
2017-09-22 20:07:17 -04:00
(core/init)