Skip to content

Commit a460b75

Browse files
committed
ignore :foreign-libs overrides in cljs.closure/expand-libs
1 parent 02b8d6e commit a460b75

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,21 +1995,23 @@
19951995
(string/includes? p' "_")
19961996
(conj (string/replace p' "_" "-")))))
19971997
(expand-lib* [{:keys [file] :as lib}]
1998-
(let [root (.getAbsolutePath (io/file file))
1999-
dir (io/file file)]
2000-
(if (.isDirectory dir)
2001-
(into []
2002-
(comp
2003-
(filter #(.endsWith (.getName ^File %) ".js"))
2004-
(filter #(not (.isHidden ^File %)))
2005-
(map
2006-
(fn [^File f]
2007-
(let [p (.getPath f)
2008-
ap (.getAbsolutePath f)]
2009-
(merge lib
2010-
{:file p :provides (path->provides (prep-path ap root))})))))
2011-
(file-seq dir))
2012-
[lib])))]
1998+
(if-not file
1999+
[] ;; foreign-lib override case - David
2000+
(let [root (.getAbsolutePath (io/file file))
2001+
dir (io/file file)]
2002+
(if (.isDirectory dir)
2003+
(into []
2004+
(comp
2005+
(filter #(.endsWith (.getName ^File %) ".js"))
2006+
(filter #(not (.isHidden ^File %)))
2007+
(map
2008+
(fn [^File f]
2009+
(let [p (.getPath f)
2010+
ap (.getAbsolutePath f)]
2011+
(merge lib
2012+
{:file p :provides (path->provides (prep-path ap root))})))))
2013+
(file-seq dir))
2014+
[lib]))))]
20132015
(into [] (mapcat expand-lib* libs))))
20142016

20152017
(declare index-node-modules)

0 commit comments

Comments
 (0)