Make testing demo a little easier

This commit is contained in:
Dan Holmsand 2014-01-29 11:53:45 +01:00
parent 344e9e5db5
commit 702f0c3238
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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)