Permalink
Browse files

Munge Closure namespaces read in from pre-compiled JavaScript files.

  • Loading branch information...
1 parent 16762c9 commit a6706916d0f0d85b18ee27423c9c62c46dd8bfd2 @lynaghk lynaghk committed with swannodette Mar 21, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/clj/cljs/closure.clj
View
@@ -213,9 +213,10 @@
(remove nil?)
(map #(drop 1 %))
(reduce (fn [m ns]
- (if (= (first ns) "require")
- (conj-in m :requires (last ns))
- (conj-in m :provides (last ns))))
+ (let [munged-ns (string/replace (last ns) "_" "-")]
+ (if (= (first ns) "require")
+ (conj-in m :requires munged-ns)
+ (conj-in m :provides munged-ns))))
{:requires [] :provides []}))))
;; Protocols for IJavaScript and Compilable

0 comments on commit a670691

Please sign in to comment.