Skip to content
Permalink
8c99a3bfd4
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
56 lines (46 sloc) 1.42 KB
(require
'[figwheel-sidecar.repl-api :as ra]
'[com.stuartsierra.component :as component]
'[clojure.string :as string])
(import 'java.lang.Runtime)
(def figwheel-config
{:figwheel-options {:css-dirs ["resources/public/css"]}
:build-ids ["dev", "test"] ; NOTE test as well?
:all-builds
[{:id "dev"
:source-paths ["src/cljs"]
:figwheel {:on-jsload "ulysses.core/mount-root"}
:compiler {:main "ulysses.core"
:output-to "resources/public/js/compiled/app.js"
:output-dir "resources/public/js/compiled/out"
:asset-path "js/compiled/out"
:source-map-timestamp true}}
{:id "test"
:source-paths ["src/cljs" "test/cljs"]
:compiler {:output-to "resources/public/js/compiled/test.js"
:main "ulysses.runner"
:optimizations :none}}]})
(defrecord Figwheel []
component/Lifecycle
(start [config]
(ra/start-figwheel! config)
config)
(stop [config]
(ra/stop-figwheel!)
config))
(def system
(atom
(component/system-map
:figwheel (map->Figwheel figwheel-config))))
(defn start []
(swap! system component/start))
(defn stop []
(swap! system component/stop))
(defn reload []
(stop)
(start))
(defn repl []
(ra/cljs-repl))
;; start the components and the repl
(start)
(repl)