Skip to content

Commit 886b311

Browse files
committed
Cleanup: remove dependency on core.async
1 parent 73988c5 commit 886b311

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

project.clj

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
:dependencies [[org.clojure/clojure "1.7.0"]
99
[org.clojure/clojurescript "1.7.228"]
1010
[prismatic/dommy "0.1.2"]
11-
[jayq "2.5.4"]
12-
[org.clojure/core.async "0.2.374"]]
11+
[jayq "2.5.4"]]
1312

1413
:plugins [[lein-cljsbuild "1.1.2"]
1514
[specljs "2.9.1"]]

src/koans/core.cljs

+3-12
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
[clojure.string]
88
[koans.meditations :as meditations]
99
[jayq.core :as $]
10-
[dommy.core :as dommy]
11-
[cljs.core.async :as async :refer [<! >! chan]])
10+
[dommy.core :as dommy])
1211
(:use-macros
13-
[dommy.macros :only [deftemplate]])
14-
(:require-macros [cljs.core.async.macros :refer [go]]))
12+
[dommy.macros :only [deftemplate]]))
1513

1614
(defn hash-objects [] (clojure.string/split (.-hash js/location) "/" ))
1715

@@ -76,8 +74,6 @@
7674
(clojure.string/join " "))]
7775
(str fns " " code)))))
7876

79-
(def resize-chan (chan))
80-
8177
(defn load-next-koan []
8278
(update-location-hash))
8379

@@ -147,11 +143,6 @@
147143
(>= (- input-width (* 4 char-width)) shadow-width)
148144
($/width $input (+ shadow-width (* 4 char-width)))))))
149145

150-
(go
151-
(while true
152-
(let [e (<! resize-chan)]
153-
(resize-input (.-target e)))))
154-
155146
(defn show-error-message []
156147
(let [$code-box ($ :.code-box)]
157148
(if ($/has-class $code-box "incorrect")
@@ -187,7 +178,7 @@
187178
(when (= (.-which e) enter-key)
188179
(evaluate-koan))))
189180
($/on ($ js/document) :input :input (fn [e]
190-
(go (>! resize-chan e))))
181+
(resize-input (.-target e))))
191182

192183
#_(if-not (clojure.string/blank? (.-hash js/location))
193184
($/hide ($ "#welcome")))

0 commit comments

Comments
 (0)