mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-22 14:58:12 +00:00
Add tracing config
This commit is contained in:
parent
e9b679c64a
commit
91030020bb
1
examples/todomvc/checkouts/re-frame-trace
Symbolic link
1
examples/todomvc/checkouts/re-frame-trace
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../re-frame-trace/
|
@ -1,23 +1,27 @@
|
|||||||
(defproject todomvc-re-frame "0.10.1"
|
(defproject todomvc-re-frame "0.10.1"
|
||||||
:dependencies [[org.clojure/clojure "1.8.0"]
|
:dependencies [[org.clojure/clojure "1.9.0"]
|
||||||
[org.clojure/clojurescript "1.9.908"]
|
[org.clojure/clojurescript "1.9.908"]
|
||||||
[reagent "0.7.0"]
|
[reagent "0.8.0-alpha2" :exclusions [[cljsjs/react] [cljsjs/react-dom]]]
|
||||||
[re-frame "0.10.1"]
|
[cljsjs/react-dom "16.2.0-3"]
|
||||||
|
[re-frame "0.10.3" :exclusions [reagent]]
|
||||||
[binaryage/devtools "0.9.4"]
|
[binaryage/devtools "0.9.4"]
|
||||||
[secretary "1.2.3"]]
|
[secretary "1.2.3"]]
|
||||||
|
|
||||||
|
|
||||||
:plugins [[lein-cljsbuild "1.1.5"]
|
:plugins [[lein-cljsbuild "1.1.5"]
|
||||||
[lein-figwheel "0.5.13"]]
|
[lein-figwheel "0.5.15-SNAPSHOT"]]
|
||||||
|
|
||||||
:hooks [leiningen.cljsbuild]
|
:hooks [leiningen.cljsbuild]
|
||||||
|
|
||||||
:profiles {:dev {:cljsbuild
|
:profiles {:dev {:dependencies [[day8.re-frame/trace "0.1.19-SNAPSHOT"]]
|
||||||
|
:cljsbuild
|
||||||
{:builds {:client {:compiler {:asset-path "js"
|
{:builds {:client {:compiler {:asset-path "js"
|
||||||
:optimizations :none
|
:optimizations :none
|
||||||
:source-map true
|
:source-map true
|
||||||
:source-map-timestamp true
|
:source-map-timestamp true
|
||||||
:main "todomvc.core"}
|
:main "todomvc.core"
|
||||||
|
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
|
||||||
|
:preloads [day8.re-frame.trace.preload]}
|
||||||
:figwheel {:on-jsload "todomvc.core/main"}}}}}
|
:figwheel {:on-jsload "todomvc.core/main"}}}}}
|
||||||
|
|
||||||
:prod {:cljsbuild
|
:prod {:cljsbuild
|
||||||
@ -26,11 +30,15 @@
|
|||||||
:pretty-print false}}}}}}
|
:pretty-print false}}}}}}
|
||||||
|
|
||||||
:figwheel {:server-port 3450
|
:figwheel {:server-port 3450
|
||||||
:repl true}
|
:repl false}
|
||||||
|
|
||||||
|
|
||||||
:clean-targets ^{:protect false} ["resources/public/js" "target"]
|
:clean-targets ^{:protect false} ["resources/public/js" "target"]
|
||||||
|
|
||||||
:cljsbuild {:builds {:client {:source-paths ["src" "../../src"]
|
:cljsbuild {:builds {:client {:source-paths ["src" #_ "../../src" "checkouts/re-frame-trace/src"]
|
||||||
|
:compile-paths ["src"]
|
||||||
:compiler {:output-dir "resources/public/js"
|
:compiler {:output-dir "resources/public/js"
|
||||||
:output-to "resources/public/js/client.js"}}}})
|
:output-to "resources/public/js/client.js"}}
|
||||||
|
:dev {:source-paths ["src" #_"../../src" "checkouts/re-frame-trace/src"]
|
||||||
|
:compiler {:output-dir "resources/public/js1"
|
||||||
|
:output-to "resources/public/js1/client.js"}}}})
|
||||||
|
@ -189,3 +189,8 @@
|
|||||||
(reduce #(assoc-in %1 [%2 :done] new-done)
|
(reduce #(assoc-in %1 [%2 :done] new-done)
|
||||||
todos
|
todos
|
||||||
(keys todos)))))
|
(keys todos)))))
|
||||||
|
|
||||||
|
(reg-event-db
|
||||||
|
:other-panel?
|
||||||
|
(fn [db _]
|
||||||
|
(update db :other-panel? not)))
|
||||||
|
@ -162,3 +162,8 @@
|
|||||||
:<- [:completed-count]
|
:<- [:completed-count]
|
||||||
(fn [[todos completed] _]
|
(fn [[todos completed] _]
|
||||||
[(- (count todos) completed) completed]))
|
[(- (count todos) completed) completed]))
|
||||||
|
|
||||||
|
(reg-sub
|
||||||
|
:other-panel?
|
||||||
|
(fn [db _]
|
||||||
|
(:other-panel? db)))
|
||||||
|
@ -96,11 +96,17 @@
|
|||||||
|
|
||||||
(defn todo-app
|
(defn todo-app
|
||||||
[]
|
[]
|
||||||
|
(let [other-panel? @(subscribe [:other-panel?])]
|
||||||
|
(if other-panel?
|
||||||
[:div
|
[:div
|
||||||
|
[:h2 "Other panel"]
|
||||||
|
[:button {:on-click #(dispatch [:other-panel?])} "Switch Panel"]]
|
||||||
|
[:div
|
||||||
|
[:button {:on-click #(dispatch [:other-panel?])} "Switch Panel"]
|
||||||
[:section#todoapp
|
[:section#todoapp
|
||||||
[task-entry]
|
[task-entry]
|
||||||
(when (seq @(subscribe [:todos]))
|
(when (seq @(subscribe [:todos]))
|
||||||
[task-list])
|
[task-list])
|
||||||
[footer-controls]]
|
[footer-controls]]
|
||||||
[:footer#info
|
[:footer#info
|
||||||
[:p "Double-click to edit a todo"]]])
|
[:p "Double-click to edit a todo"]]])))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user