File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 263263 add-cljs-base add-cljs-base-dep)))
264264 )
265265
266+ (defn parent? [f0 f1]
267+ (.startsWith
268+ (.getAbsolutePath (io/file f0))
269+ (.getAbsolutePath (io/file f1))))
270+
271+ ; ; JS modules become Closure libs that exist in the output directory. However in
272+ ; ; the current indexing pipeline, these will not have an :out-file. Correct these
273+ ; ; entries for module->module-uris - David
274+
275+ (defn maybe-add-out-file
276+ [{:keys [lib-path] :as ijs} {:keys [output-dir] :as opts}]
277+ (if-not lib-path
278+ ijs
279+ (if (parent? lib-path output-dir)
280+ (assoc ijs :out-file lib-path)
281+ ijs)))
282+
266283(defn modules->module-uris
267284 " Given a :modules map, a dependency sorted list of compiler inputs, and
268285 compiler options return a Closure module uris map. This map will include
293310 (fn [{:keys [out-file] :as ijs}]
294311 (if-not out-file
295312 (throw (Exception. (str " No :out-file for IJavaScript " (pr-str ijs))))
296- out-file))))
313+ out-file))
314+ #(maybe-add-out-file % opts)))
297315 (distinct ))
298316 entries)]))
299317 (expand-modules modules inputs))
You can’t perform that action at this time.
0 commit comments