Skip to content

Commit e9c9c08

Browse files
author
dnolen
committed
add 2 arg compile-sources
1 parent 14b7b59 commit e9c9c08

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -788,20 +788,22 @@
788788
(defn compile-sources
789789
"Takes dependency ordered list of IJavaScript compatible maps from parse-ns
790790
and compiles them."
791-
[inputs compiler-stats opts]
792-
(if (:parallel-build opts)
793-
(parallel-compile-sources inputs compiler-stats opts)
794-
(util/measure compiler-stats
795-
"Compile sources"
796-
(binding [comp/*inputs* (zipmap (map :ns inputs) inputs)]
797-
(doall
798-
(for [ns-info inputs]
799-
; TODO: compile-file calls parse-ns unnecessarily to get ns-info
800-
; TODO: we could mark dependent namespaces for recompile here
801-
(-compile (or (:source-file ns-info)
802-
(:source-forms ns-info))
803-
; - ns-info -> ns -> cljs file relpath -> js relpath
804-
(merge opts {:output-file (comp/rename-to-js (util/ns->relpath (:ns ns-info)))}))))))))
791+
([inputs opts]
792+
(compile-sources inputs (:compiler-stats opts) opts))
793+
([inputs compiler-stats opts]
794+
(if (:parallel-build opts)
795+
(parallel-compile-sources inputs compiler-stats opts)
796+
(util/measure compiler-stats
797+
"Compile sources"
798+
(binding [comp/*inputs* (zipmap (map :ns inputs) inputs)]
799+
(doall
800+
(for [ns-info inputs]
801+
; TODO: compile-file calls parse-ns unnecessarily to get ns-info
802+
; TODO: we could mark dependent namespaces for recompile here
803+
(-compile (or (:source-file ns-info)
804+
(:source-forms ns-info))
805+
; - ns-info -> ns -> cljs file relpath -> js relpath
806+
(merge opts {:output-file (comp/rename-to-js (util/ns->relpath (:ns ns-info)))})))))))))
805807

806808
(defn add-goog-base
807809
[inputs]

0 commit comments

Comments
 (0)