Skip to content

Commit ccfdf1c

Browse files
committed
add new :main terminal flag, --install-deps
1 parent fa264e3 commit ccfdf1c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/main/clojure/cljs/cli.clj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ present"
463463
9000)
464464
:output-dir (:output-dir options "out")})))
465465

466+
(defn- install-deps-opt
467+
[_ _ {:keys [options] :as cfg}]
468+
(closure/maybe-install-node-deps! options))
469+
466470
(defn get-main-ns [{:keys [ns options] :as cfg}]
467471
(if (and ns (not (#{"-r" "--repl" "-s" "--serve"} ns)))
468472
(symbol ns)
@@ -619,7 +623,9 @@ present"
619623
"system-dependent path-separated list of EDN files / classpath resources. Options "
620624
"will be merged left to right.")}}
621625
:main
622-
{["-r" "--repl"] {:fn repl-opt
626+
{["--install-deps"] {:fn install-deps-opt
627+
:doc "Install all :npm-deps found upstream and in supplied compiler options"}
628+
["-r" "--repl"] {:fn repl-opt
623629
:doc "Run a repl"}
624630
["-m" "--main"] {:fn main-opt
625631
:arg "ns"

0 commit comments

Comments
 (0)