Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit a6706916d0f0d85b18ee27423c9c62c46dd8bfd2 1 parent 16762c9
@lynaghk lynaghk authored swannodette committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/clj/cljs/closure.clj
View
7 src/clj/cljs/closure.clj
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.