mirror of https://github.com/status-im/reagent.git
Tweak demo and testing
This commit is contained in:
parent
c23bb970e7
commit
8110b1aca8
6
Makefile
6
Makefile
|
@ -25,6 +25,12 @@ buildrun: setup
|
|||
runtest:
|
||||
$(MAKE) PROF=test,$(PROF)
|
||||
|
||||
runsite: setup
|
||||
(sleep 3 && open "http://127.0.0.1:$(PORT)") &
|
||||
( trap "kill 0" SIGINT SIGTERM EXIT; \
|
||||
( python -m SimpleHTTPServer $(PORT) & ); \
|
||||
lein -o with-profile $(PROF) cljsbuild auto $(CLJSBUILD) )
|
||||
|
||||
install: leinbuild
|
||||
lein install
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ ul.nav {
|
|||
height: 40px;
|
||||
padding-left: 60px;
|
||||
padding-top: 10px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
ul.nav > li {
|
||||
|
|
|
@ -7,11 +7,7 @@
|
|||
[reagent.core :as reagent :refer [atom]]
|
||||
[demo :as demo]))
|
||||
|
||||
(defn ^:export console-print [x]
|
||||
(when (not= x "\n")
|
||||
(println x)))
|
||||
|
||||
(set-print-fn! console-print)
|
||||
(enable-console-print!)
|
||||
|
||||
(def test-results (atom nil))
|
||||
|
||||
|
@ -24,7 +20,7 @@
|
|||
|
||||
(defn test-output []
|
||||
(let [res @test-results]
|
||||
[:div
|
||||
[:div {:style {:margin-top "40px"}}
|
||||
(if-not res
|
||||
[:div "waiting for tests to run"]
|
||||
[:div
|
||||
|
|
Loading…
Reference in New Issue