Skip to content

Commit 7ca0551

Browse files
committed
cljs.cli/default-compile: add a way to run something after the build before the
repl or the server (which do not exit)
1 parent c3cbd80 commit 7ca0551

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/clojure/cljs/cli.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ present"
484484
(:main options)))
485485

486486
(defn default-compile
487-
[repl-env {:keys [ns args options] :as cfg}]
487+
[repl-env {:keys [ns args options post-compile-fn] :as cfg}]
488488
(let [rfs #{"-r" "--repl"}
489489
sfs #{"-s" "--serve"}
490490
env-opts (repl/repl-options (repl-env))
@@ -528,6 +528,8 @@ present"
528528
(build/build source opts cenv)
529529
(build/watch path opts cenv))
530530
(build/build source opts cenv))
531+
(when (fn? post-compile-fn)
532+
(post-compile-fn))
531533
(when repl?
532534
(repl-opt repl-env args cfg))
533535
(when serve?

0 commit comments

Comments
 (0)