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:
|
runtest:
|
||||||
$(MAKE) PROF=test,$(PROF)
|
$(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
|
install: leinbuild
|
||||||
lein install
|
lein install
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ ul.nav {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding-left: 60px;
|
padding-left: 60px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.nav > li {
|
ul.nav > li {
|
||||||
|
|
|
@ -7,11 +7,7 @@
|
||||||
[reagent.core :as reagent :refer [atom]]
|
[reagent.core :as reagent :refer [atom]]
|
||||||
[demo :as demo]))
|
[demo :as demo]))
|
||||||
|
|
||||||
(defn ^:export console-print [x]
|
(enable-console-print!)
|
||||||
(when (not= x "\n")
|
|
||||||
(println x)))
|
|
||||||
|
|
||||||
(set-print-fn! console-print)
|
|
||||||
|
|
||||||
(def test-results (atom nil))
|
(def test-results (atom nil))
|
||||||
|
|
||||||
|
@ -24,7 +20,7 @@
|
||||||
|
|
||||||
(defn test-output []
|
(defn test-output []
|
||||||
(let [res @test-results]
|
(let [res @test-results]
|
||||||
[:div
|
[:div {:style {:margin-top "40px"}}
|
||||||
(if-not res
|
(if-not res
|
||||||
[:div "waiting for tests to run"]
|
[:div "waiting for tests to run"]
|
||||||
[:div
|
[:div
|
||||||
|
|
Loading…
Reference in New Issue