Skip to content

Commit 435af1a

Browse files
author
dnolen
committed
don't build unless first time
1 parent 835a117 commit 435af1a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/clojure/cljs/repl/browser.clj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@
174174
json/write-str)]
175175
;; TODO: this could be cleaner if compiling forms resulted in a
176176
;; :output-to file with the result of compiling those forms - David
177-
(spit (io/file "out/cljs_deps.js")
178-
(build/build
179-
'[(require '[clojure.browser.repl.preload])] {:optimizations :none}))
177+
(let [f (io/file "out/cljs_deps.js")]
178+
(when-not (.exists f)
179+
(spit f
180+
(build/build
181+
'[(require '[clojure.browser.repl.preload])] {:optimizations :none}))))
180182
(server/send-and-close conn 200
181183
(str "var CLOSURE_UNCOMPILED_DEFINES = " closure-defines ";\n"
182184
"var CLOSURE_NO_DEPS = true;\n"

0 commit comments

Comments
 (0)