Skip to content

Commit 3a6e71e

Browse files
committed
make source an optional argument to cljs.closure/build and
cljs.build.api/build
1 parent d8991b4 commit 3a6e71e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/main/clojure/cljs/build/api.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@
187187
(apply closure/output-unoptimized opts sources))
188188

189189
(defn build
190-
"Given a source which can be compiled, produce runnable JavaScript."
190+
"Given compiler options, produce runnable JavaScript. An optional source
191+
parameter may be provided."
192+
([opts]
193+
(build nil opts))
191194
([source opts]
192195
(build source opts
193196
(if-not (nil? env/*compiler*)

src/main/clojure/cljs/closure.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2695,7 +2695,10 @@
26952695
(compile-inputs (find-sources ns opts) opts))
26962696

26972697
(defn build
2698-
"Given a source which can be compiled, produce runnable JavaScript."
2698+
"Given compiler options, produce runnable JavaScript. An optional source
2699+
parameter may be provided."
2700+
([opts]
2701+
(build nil opts))
26992702
([source opts]
27002703
(build source opts
27012704
(if-not (nil? env/*compiler*)

0 commit comments

Comments
 (0)