Remove dead code (mostly unused requires)

This commit is contained in:
Nicholas Kariniemi 2015-06-16 20:03:32 +03:00
parent f7b79a5e2a
commit cc3dbdca62
6 changed files with 31 additions and 39 deletions

View file

@ -1,7 +1,6 @@
(ns grub.db
(:require [monger.core :as m]
[monger.collection :as mc]
[monger.operators :as mo]
[clojure.core.async :as a :refer [<! >! chan go]]))
(def collection "grub-lists")

View file

@ -1,15 +1,9 @@
(ns grub.websocket
(:require [grub.db :as db]
[org.httpkit.server :as httpkit]
(:require [org.httpkit.server :as httpkit]
[clojure.core.async :as a :refer [<! >! chan go]]
[cognitect.transit :as t])
(:import [java.io ByteArrayInputStream ByteArrayOutputStream]))
(defn disconnected [status ws-channel to from]
(println "Client disconnected:" (.toString ws-channel) "with status" status)
(a/close! to)
(a/close! from))
(defn write-msg [msg]
(let [out (ByteArrayOutputStream. 4096)
writer (t/writer out :json)]

View file

@ -23,8 +23,8 @@
>remote (chan)
events (chan)
view-state (view/render-app state/empty-state render-states new-states)
ws (websocket/connect pending-msg >remote events)
agent-states (sync/sync-client! >remote events new-states states)]
ws (websocket/connect pending-msg >remote events)]
(sync/sync-client! >remote events new-states states)
(add-watch states :render (fn [_ _ old new]
(when-not (= old new)
(a/put! render-states (state/get-latest new)))))

View file

@ -1,7 +1,7 @@
(ns grub.view.grub
(:require [grub.view.dom :as dom]
[om.core :as om :include-macros true]
[sablono.core :as html :refer-macros [html]]
[sablono.core :refer-macros [html]]
[cljs.core.async :as a :refer [<! put! chan]]
[cljs-uuid.core :as uuid])
(:require-macros [grub.macros :refer [log logs]]

View file

@ -2,7 +2,7 @@
(:require [grub.view.dom :as dom]
[grub.view.grub :as grub-view]
[om.core :as om :include-macros true]
[sablono.core :as html :refer-macros [html]]
[sablono.core :refer-macros [html]]
[cljs.core.async :as a :refer [<! chan]])
(:require-macros [grub.macros :refer [log logs]]
[cljs.core.async.macros :refer [go go-loop]]))
@ -32,7 +32,6 @@
:remove-grub-ch (chan)})
om/IRenderState
(render-state [this {:keys [new-grub-text remove-grub-ch] :as state}]
(let [add (om/get-shared owner :grub-add)]
(html
[:div
[:h3 "Grub List"]
@ -58,7 +57,7 @@
:class (when (empty? grubs) "hidden")
:type "button"
:on-click #(om/update! grubs nil {} :local)}
"Clear all"]])))
"Clear all"]]))
om/IWillMount
(will-mount [_]
(let [add-grubs-ch (om/get-shared owner :add-grubs-ch)

View file

@ -3,7 +3,7 @@
[grub.view.grub :as grub-view]
[grub.util :as util]
[om.core :as om :include-macros true]
[sablono.core :as html :refer-macros [html]]
[sablono.core :refer-macros [html]]
[cljs.core.async :as a :refer [<! put! chan]]
[cljs-uuid.core :as uuid])
(:require-macros [grub.macros :refer [log logs]]