Permalink
Browse files

Emit goog.require for 'used' namespaces. Refs #CLJS-65

  • Loading branch information...
brentonashworth committed Sep 14, 2011
1 parent a7855b3 commit 11b0378e53d4e68cb5af207264cecaae5649f1d6
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/clj/cljs/compiler.clj
@@ -518,11 +518,11 @@
(emit-wrap env (print (str (emits target) " = "(emits val)))))
(defmethod emit :ns
- [{:keys [name requires requires-macros env]}]
+ [{:keys [name requires uses requires-macros env]}]
(println (str "goog.provide('" (munge name) "');"))
(when-not (= name 'cljs.core)
(println (str "goog.require('cljs.core');")))
- (doseq [lib (vals requires)]
+ (doseq [lib (into (vals requires) (vals uses))]
(println (str "goog.require('" (munge lib) "');"))))
(defmethod emit :deftype*

0 comments on commit 11b0378

Please sign in to comment.