From badf3cdf6b78cdce8de8b31233b61d76a33b83a0 Mon Sep 17 00:00:00 2001 From: David Nolen Date: Mon, 16 Mar 2015 09:15:14 -0400 Subject: [PATCH] `cljs.closure/add-implicit-options` add the implicit options for :optimizations :advanced --- src/clj/cljs/closure.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/clj/cljs/closure.clj b/src/clj/cljs/closure.clj index 61418a899d..4e28fcad67 100644 --- a/src/clj/cljs/closure.clj +++ b/src/clj/cljs/closure.clj @@ -1353,7 +1353,12 @@ should contain the source for the given namespace name." (= optimizations :none) (assoc :cache-analysis (:cache-analysis opts true) - :source-map (:source-map opts true))))) + :source-map (:source-map opts true)) + + (= optimizations :advanced) + (cond-> + (not (false? (:static-fns opts))) (assoc :static-fns true) + (not (false? (:optimize-constants opts))) (assoc :optimize-constants true))))) (defn build "Given a source which can be compiled, produce runnable JavaScript."