Update Om to fix production build issues
This commit is contained in:
parent
9e6d900596
commit
6ca589e3e6
7 changed files with 22 additions and 38785 deletions
20
project.clj
20
project.clj
|
@ -6,7 +6,7 @@
|
||||||
:dependencies [[org.clojure/clojure "1.7.0"]
|
:dependencies [[org.clojure/clojure "1.7.0"]
|
||||||
[org.clojure/clojurescript "0.0-3308"]
|
[org.clojure/clojurescript "0.0-3308"]
|
||||||
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
|
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
|
||||||
[om "0.7.3"]
|
[org.omcljs/om "0.8.8"]
|
||||||
[http-kit "2.1.19"]
|
[http-kit "2.1.19"]
|
||||||
[ring/ring-core "1.3.2" :exclusions [org.clojure/tools.reader]]
|
[ring/ring-core "1.3.2" :exclusions [org.clojure/tools.reader]]
|
||||||
[hiccup "1.0.5"]
|
[hiccup "1.0.5"]
|
||||||
|
@ -27,17 +27,15 @@
|
||||||
:min-lein-version "2.1.2"
|
:min-lein-version "2.1.2"
|
||||||
:plugins [[lein-cljsbuild "1.0.3"]
|
:plugins [[lein-cljsbuild "1.0.3"]
|
||||||
[lein-ring "0.8.6"]]
|
[lein-ring "0.8.6"]]
|
||||||
:cljsbuild {:builds {:dev {:source-paths ["src/cljs" "src/cljc"]
|
:cljsbuild {:builds {:dev {:source-paths ["src/cljs" "src/cljc"]
|
||||||
:compiler {:output-dir "resources/public/js/out"
|
:compiler {:output-dir "resources/public/js/out"
|
||||||
:output-to "resources/public/js/grub.js"
|
:output-to "resources/public/js/grub.js"
|
||||||
:optimizations :none
|
:optimizations :none
|
||||||
:source-map true}}
|
:source-map true}}
|
||||||
:prod {:source-paths ["src/cljs" "src/cljc"]
|
:prod {:source-paths ["src/cljs" "src/cljc"]
|
||||||
:compiler {:output-to "resources/public/js/grub.min.js"
|
:compiler {:output-to "resources/public/js/grub.min.js"
|
||||||
:optimizations :advanced
|
:optimizations :advanced
|
||||||
:pretty-print false
|
:pretty-print false}}}}
|
||||||
:preamble ["react/react.min.js"]
|
|
||||||
:externs ["react/externs/react.js"]}}}}
|
|
||||||
:source-paths ["src/clj" "src/cljc" "target/classes"]
|
:source-paths ["src/clj" "src/cljc" "target/classes"]
|
||||||
:test-paths ["src/test"]
|
:test-paths ["src/test"]
|
||||||
:ring {:handler grub.core/app}
|
:ring {:handler grub.core/app}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,6 @@
|
||||||
(hiccup/include-css "./css/styles.css")]
|
(hiccup/include-css "./css/styles.css")]
|
||||||
[:body
|
[:body
|
||||||
[:div#container]
|
[:div#container]
|
||||||
(hiccup/include-js "./js/react-0.11.2-with-addons.js")
|
|
||||||
(hiccup/include-js "./js/out/goog/base.js")
|
(hiccup/include-js "./js/out/goog/base.js")
|
||||||
(hiccup/include-js "./js/grub.js")
|
(hiccup/include-js "./js/grub.js")
|
||||||
[:script {:type "text/javascript"} "goog.require(\"grub.core\")"]]))
|
[:script {:type "text/javascript"} "goog.require(\"grub.core\")"]]))
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
(when (= edit-state :editing) "edit")]
|
(when (= edit-state :editing) "edit")]
|
||||||
:on-click (fn [e] (when (#{:waiting :pressed} edit-state)
|
:on-click (fn [e] (when (#{:waiting :pressed} edit-state)
|
||||||
(om/transact! grub nil #(assoc % :completed (not completed)) :local)
|
(om/transact! grub nil #(assoc % :completed (not completed)) :local)
|
||||||
(.blur (om/get-node owner :grub-input))))
|
(.blur (om/get-node owner "grub-input"))))
|
||||||
:on-mouse-down #(transition-state owner :mouse-down)
|
:on-mouse-down #(transition-state owner :mouse-down)
|
||||||
:on-mouse-up #(transition-state owner :mouse-up)
|
:on-mouse-up #(transition-state owner :mouse-up)
|
||||||
:on-mouse-leave #(transition-state owner :mouse-leave)
|
:on-mouse-leave #(transition-state owner :mouse-leave)
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
[:input.grub-input
|
[:input.grub-input
|
||||||
{:type "text"
|
{:type "text"
|
||||||
:readOnly (if (= edit-state :editing) "" "readonly")
|
:readOnly (if (= edit-state :editing) "" "readonly")
|
||||||
:ref :grub-input
|
:ref "grub-input"
|
||||||
:value (:grub-text state)
|
:value (:grub-text state)
|
||||||
:on-change #(om/set-state! owner :grub-text (.. % -target -value))
|
:on-change #(om/set-state! owner :grub-text (.. % -target -value))
|
||||||
:on-key-up #(when (dom/enter-pressed? %) (transition-state owner :enter))}]
|
:on-key-up #(when (dom/enter-pressed? %) (transition-state owner :enter))}]
|
||||||
|
|
|
@ -79,8 +79,8 @@
|
||||||
(html
|
(html
|
||||||
[:div.panel.panel-default.recipe-panel
|
[:div.panel.panel-default.recipe-panel
|
||||||
{:on-click
|
{:on-click
|
||||||
#(when (not (or (dom/click-on-elem? % (om/get-node owner :add-grubs-btn))
|
#(when (not (or (dom/click-on-elem? % (om/get-node owner "add-grubs-btn"))
|
||||||
(dom/click-on-elem? % (om/get-node owner :save-btn))))
|
(dom/click-on-elem? % (om/get-node owner "save-btn"))))
|
||||||
(transition-state owner :click))}
|
(transition-state owner :click))}
|
||||||
[:div.panel-heading.recipe-header
|
[:div.panel-heading.recipe-header
|
||||||
{:class (when (= edit-state :editing) "edit")}
|
{:class (when (= edit-state :editing) "edit")}
|
||||||
|
@ -90,9 +90,9 @@
|
||||||
:value name
|
:value name
|
||||||
:on-change #(om/set-state! owner :name (dom/event-val %))}]
|
:on-change #(om/set-state! owner :name (dom/event-val %))}]
|
||||||
[:button.btn.btn-primary.btn-sm.recipe-add-grubs-btn
|
[:button.btn.btn-primary.btn-sm.recipe-add-grubs-btn
|
||||||
{:type "button"
|
{:type "button"
|
||||||
:class (when (= edit-state :editing) "hidden")
|
:class (when (= edit-state :editing) "hidden")
|
||||||
:ref :add-grubs-btn
|
:ref "add-grubs-btn"
|
||||||
:on-click #(add-grubs (om/get-shared owner :add-grubs-ch) grubs)}
|
:on-click #(add-grubs (om/get-shared owner :add-grubs-ch) grubs)}
|
||||||
[:span.glyphicon.glyphicon-plus]
|
[:span.glyphicon.glyphicon-plus]
|
||||||
" Grubs"]]
|
" Grubs"]]
|
||||||
|
@ -115,8 +115,8 @@
|
||||||
:on-click #(put! remove-recipe-ch id)}
|
:on-click #(put! remove-recipe-ch id)}
|
||||||
[:span.glyphicon.glyphicon-trash]]
|
[:span.glyphicon.glyphicon-trash]]
|
||||||
[:button.btn.btn-primary.pull-right.recipe-done-btn
|
[:button.btn.btn-primary.pull-right.recipe-done-btn
|
||||||
{:type "button"
|
{:type "button"
|
||||||
:ref :save-btn
|
:ref "save-btn"
|
||||||
:on-click #(transition-state owner :save)}
|
:on-click #(transition-state owner :save)}
|
||||||
[:span.glyphicon.glyphicon-ok]]]])))
|
[:span.glyphicon.glyphicon-ok]]]])))
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
(render-state [this {:keys [edit-state new-recipe-name new-recipe-grubs new-recipe-directions]}]
|
(render-state [this {:keys [edit-state new-recipe-name new-recipe-grubs new-recipe-directions]}]
|
||||||
(html
|
(html
|
||||||
[:div.panel.panel-default.recipe-panel
|
[:div.panel.panel-default.recipe-panel
|
||||||
{:on-click #(when (not (dom/click-on-elem? % (om/get-node owner :save-btn)))
|
{:on-click #(when (not (dom/click-on-elem? % (om/get-node owner "save-btn")))
|
||||||
(transition-state owner :click))}
|
(transition-state owner :click))}
|
||||||
[:div.panel-heading.recipe-header.new
|
[:div.panel-heading.recipe-header.new
|
||||||
[:input.form-control.recipe-header-input
|
[:input.form-control.recipe-header-input
|
||||||
{:id "new-recipe-name"
|
{:id "new-recipe-name"
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
:placeholder "Directions"
|
:placeholder "Directions"
|
||||||
:on-change #(om/set-state! owner :new-recipe-directions (dom/event-val %))}]
|
:on-change #(om/set-state! owner :new-recipe-directions (dom/event-val %))}]
|
||||||
[:button.btn.btn-primary.pull-right.recipe-done-btn
|
[:button.btn.btn-primary.pull-right.recipe-done-btn
|
||||||
{:type "button"
|
{:type "button"
|
||||||
:ref :save-btn
|
:ref "save-btn"
|
||||||
:on-click #(transition-state owner :save)}
|
:on-click #(transition-state owner :save)}
|
||||||
[:span.glyphicon.glyphicon-ok#save-recipe-btn]]]]))
|
[:span.glyphicon.glyphicon-ok#save-recipe-btn]]]]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue