mirror of https://github.com/status-im/reagent.git
Make testing demo a little easier
This commit is contained in:
parent
344e9e5db5
commit
702f0c3238
2
Makefile
2
Makefile
|
@ -29,7 +29,7 @@ runsite: setup
|
||||||
(sleep 3 && open "http://127.0.0.1:$(PORT)/$$(basename $$PWD)") &
|
(sleep 3 && open "http://127.0.0.1:$(PORT)/$$(basename $$PWD)") &
|
||||||
( trap "kill 0" SIGINT SIGTERM EXIT; \
|
( trap "kill 0" SIGINT SIGTERM EXIT; \
|
||||||
( cd .. && python -m SimpleHTTPServer $(PORT) & ); \
|
( cd .. && python -m SimpleHTTPServer $(PORT) & ); \
|
||||||
lein -o with-profile $(PROF) cljsbuild auto $(CLJSBUILD) )
|
lein -o with-profile $(PROF),prod cljsbuild auto $(CLJSBUILD) )
|
||||||
|
|
||||||
install: leinbuild
|
install: leinbuild
|
||||||
lein install
|
lein install
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
(defn setup-history []
|
(defn setup-history []
|
||||||
(when-let [h (create-history)]
|
(when-let [h (create-history)]
|
||||||
(events/listen h EventType/NAVIGATE
|
(events/listen h EventType/NAVIGATE
|
||||||
(fn [e] (reset! page (subs (.-token e)
|
(fn [e]
|
||||||
(count @base-path)))))
|
(reset! page (subs (.-token e)
|
||||||
|
(count @base-path)))
|
||||||
|
(reagent/flush)))
|
||||||
(add-watch page ::history (fn [_ _ oldp newp]
|
(add-watch page ::history (fn [_ _ oldp newp]
|
||||||
(.setToken h (str @base-path newp))))
|
(.setToken h (str @base-path newp))))
|
||||||
(.setEnabled h true)
|
(.setEnabled h true)
|
||||||
|
|
Loading…
Reference in New Issue