Permalink
Browse files

* src/clj/cljs/closure.clj: added reset-namespaces!, call this when b…

…uild is called
  • Loading branch information...
1 parent afbc67f commit 47f4a1e820dcf967f3489364eb80446259d9b959 David Nolen committed Apr 22, 2012
Showing with 6 additions and 0 deletions.
  1. +1 −0 src/clj/cljs/closure.clj
  2. +5 −0 src/clj/cljs/compiler.clj
@@ -861,6 +861,7 @@
(defn build
"Given a source which can be compiled, produce runnable JavaScript."
[source opts]
+ (comp/reset-namespaces!)
(let [opts (if (= :nodejs (:target opts))
(merge {:optimizations :simple} opts)
opts)
@@ -37,6 +37,11 @@
(defonce namespaces (atom '{cljs.core {:name cljs.core}
cljs.user {:name cljs.user}}))
+(defn reset-namespaces! []
+ (reset! namespaces
+ '{cljs.core {:name cljs.core}
+ cljs.user {:name cljs.user}}))
+
(def ^:dynamic *cljs-ns* 'cljs.user)
(def ^:dynamic *cljs-file* nil)
(def ^:dynamic *cljs-warn-on-undeclared* false)

0 comments on commit 47f4a1e

Please sign in to comment.