Skip to content

Commit fb8ce05

Browse files
committed
do not auto install node deps - add new flag for old behavior,
update compiler options
1 parent ac1e399 commit fb8ce05

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
:source-map-inline :source-map-timestamp :static-fns :target :verbose :warnings
167167
:emit-constants :ups-externs :ups-foreign-libs :ups-libs :warning-handlers :preloads
168168
:browser-repl :cache-analysis-format :infer-externs :closure-generate-exports :npm-deps
169-
:fn-invoke-direct :checked-arrays})
169+
:fn-invoke-direct :checked-arrays :closure-module-roots :rewrite-polyfills :use-only-custom-externs
170+
:watch-error-fn :watch-fn :install-deps})
170171

171172
(def string->charset
172173
{"iso-8859-1" StandardCharsets/ISO_8859_1
@@ -2435,8 +2436,9 @@
24352436
([source opts compiler-env]
24362437
(env/with-compiler-env compiler-env
24372438
;; we want to warn about NPM dep conflicts before installing the modules
2438-
(check-npm-deps opts)
2439-
(maybe-install-node-deps! opts)
2439+
(when (:install-deps opts)
2440+
(check-npm-deps opts)
2441+
(maybe-install-node-deps! opts))
24402442
(let [compiler-stats (:compiler-stats opts)
24412443
checked-arrays (or (:checked-arrays opts)
24422444
ana/*checked-arrays*)

src/main/clojure/cljs/repl.cljc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,9 @@
874874
(print nil))
875875
(let [value (eval repl-env env input opts)]
876876
(print value))))))]
877-
(cljsc/maybe-install-node-deps! opts)
877+
(when (:install-deps opts)
878+
(cljsc/check-npm-deps opts)
879+
(cljsc/maybe-install-node-deps! opts))
878880
(comp/with-core-cljs opts
879881
(fn []
880882
(binding [*repl-opts* opts]

0 commit comments

Comments
 (0)