Fork me on GitHub
#cljs-dev
<
2019-09-22
>
martinklepsch15:09:05

Hey! i want to stub out some foreign libs for analysing cljs code in a function like this:

(defn- analyze-file [file]
  (let [opts  (-> {:foreign-libs [{:file "lib/fl.js"
                                   :provides ["react"]}]}
                  (cljs.closure/add-implicit-options))
        state (cljs.env/default-compiler-env opts)]
    (ana/no-warn
     (cljs.closure/validate-opts opts)
     (ana/analyze-file state file opts))
    state))
with this approach however the analyzer throws an error that other namespaces like goog.object can’t be found

martinklepsch15:09:26

How would I directly pass the information that usually is provided via deps.cljs to the analyzer env?