File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 263
263
add-cljs-base add-cljs-base-dep)))
264
264
)
265
265
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
+
266
283
(defn modules->module-uris
267
284
" Given a :modules map, a dependency sorted list of compiler inputs, and
268
285
compiler options return a Closure module uris map. This map will include
293
310
(fn [{:keys [out-file] :as ijs}]
294
311
(if-not out-file
295
312
(throw (Exception. (str " No :out-file for IJavaScript " (pr-str ijs))))
296
- out-file))))
313
+ out-file))
314
+ #(maybe-add-out-file % opts)))
297
315
(distinct ))
298
316
entries)]))
299
317
(expand-modules modules inputs))
You can’t perform that action at this time.
0 commit comments