mirror of
https://github.com/status-im/reagent.git
synced 2025-01-28 12:45:13 +00:00
bffbae231d
Tests and doc site can now run without node, using only "lein figwheel". Tests and site are then re-run automatically whenever a source file changes. The doc site is now generated into "outsite/public", and can be copied into the "gh-pages" branch with "make build-gh-pages". "make push-gh-pages" builds the doc site and pushes it upstream to the gh-pages branch there. Generation of html pages is now handled completely in ClojureScript, loaded from "bin/gen-site.js". Link handling is a bit simplified.
23 lines
461 B
Clojure
23 lines
461 B
Clojure
(ns devsetup
|
|
(:require
|
|
[demo :as site]
|
|
[runtests]
|
|
[reagent.core :as r]
|
|
[figwheel.client :as fw :include-macros true]))
|
|
|
|
(defn test! []
|
|
(runtests/run-tests))
|
|
|
|
(defn on-update []
|
|
(r/force-update-all)
|
|
(test!))
|
|
|
|
(when r/is-client
|
|
(fw/watch-and-reload
|
|
:websocket-url "ws://localhost:3449/figwheel-ws"
|
|
:jsload-callback #(on-update)))
|
|
|
|
(demo/start! {:test-results (fn []
|
|
[runtests/test-output-mini])})
|
|
(test!)
|