Skip to content

Commit

Permalink
Merge pull request #30 from jmreidy/issue_29/remove_out_dir
Browse files Browse the repository at this point in the history
Pass output-dir to compiler
  • Loading branch information
tomjakubowski committed Oct 17, 2014
2 parents 3327312 + 21842f8 commit 102ff9a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/clj/weasel/repl/websocket.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
(defn repl-env
"Returns a JS environment to pass to repl or piggieback"
[& {:as opts}]
;; cljs master default-compiler-env takes an options argument to
;; which we should pass opts. change this for the next cljs release
(let [compiler-env (env/default-compiler-env)
(let [compiler-env (env/default-compiler-env opts)
opts (merge (WebsocketEnv.)
{::env/compiler compiler-env
:ip "127.0.0.1"
Expand All @@ -52,7 +50,7 @@
(env/with-compiler-env (::env/compiler opts)
(reset! preloaded-libs
(set/union
(transitive-deps ["weasel.repl"])
(transitive-deps ["weasel.repl"] {:output-dir "target/weasel/repl"})
(into #{} (map str (:preloaded-libs opts)))))
(reset! loaded-libs @preloaded-libs))
opts))
Expand Down Expand Up @@ -121,10 +119,10 @@
(defn- transitive-deps
"Returns a flattened set of all transitive namespaces required and
provided by the given sequence of namespaces"
[nses]
[nses opts]
(let [collect-deps #(flatten (mapcat (juxt :provides :requires) %))
cljs-deps (->> nses (cljsc/cljs-dependencies {}) collect-deps)
js-deps (->> cljs-deps (cljsc/js-dependencies {}) collect-deps)]
cljs-deps (->> nses (cljsc/cljs-dependencies opts) collect-deps)
js-deps (->> cljs-deps (cljsc/js-dependencies opts) collect-deps)]
(disj (into #{} (concat js-deps cljs-deps)) nil)))

(defn- send-for-eval! [js]
Expand Down

0 comments on commit 102ff9a

Please sign in to comment.