Skip to content

Commit c98b19a

Browse files
author
dnolen
committed
organize cljs.js-deps Java imports, add to-url case for java.net.URL
1 parent 3e4b083 commit c98b19a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/clj/cljs/js_deps.clj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
(ns cljs.js-deps
22
(:require [clojure.java.io :as io]
33
[clojure.string :as string])
4-
(:import java.io.File
5-
java.net.URL
6-
java.net.URLClassLoader
7-
java.util.zip.ZipFile
8-
java.util.zip.ZipEntry))
4+
(:import [java.io File]
5+
[java.net URL URLClassLoader]
6+
[java.util.zip ZipFile ZipEntry]))
97

108
; taken from pomegranate/dynapath
119
; https://github.com/tobias/dynapath/blob/master/src/dynapath/util.clj
@@ -48,6 +46,8 @@ If no ClassLoader is provided, RT/baseLoader is assumed."
4846

4947
(defmethod to-url File [^File f] (.toURL (.toURI f)))
5048

49+
(defmethod to-url URL [^URL url] url)
50+
5151
(defmethod to-url String [s] (to-url (io/file s)))
5252

5353
(defn find-js-fs

0 commit comments

Comments
 (0)