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)") &
|
||||
( trap "kill 0" SIGINT SIGTERM EXIT; \
|
||||
( cd .. && python -m SimpleHTTPServer $(PORT) & ); \
|
||||
lein -o with-profile $(PROF) cljsbuild auto $(CLJSBUILD) )
|
||||
lein -o with-profile $(PROF),prod cljsbuild auto $(CLJSBUILD) )
|
||||
|
||||
install: leinbuild
|
||||
lein install
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
(defn setup-history []
|
||||
(when-let [h (create-history)]
|
||||
(events/listen h EventType/NAVIGATE
|
||||
(fn [e] (reset! page (subs (.-token e)
|
||||
(count @base-path)))))
|
||||
(fn [e]
|
||||
(reset! page (subs (.-token e)
|
||||
(count @base-path)))
|
||||
(reagent/flush)))
|
||||
(add-watch page ::history (fn [_ _ oldp newp]
|
||||
(.setToken h (str @base-path newp))))
|
||||
(.setEnabled h true)
|
||||
|
|
Loading…
Reference in New Issue