Skip to content

Commit ac5c7ab

Browse files
author
dnolen
committed
add helper to convert URLs to Closure SourceFile
1 parent a373039 commit ac5c7ab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/clojure/cljs/closure.clj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@
116116
(defmethod js-source-file File [_ ^File source]
117117
(SourceFile/fromPath (.toPath source) StandardCharsets/UTF_8))
118118

119+
(defmethod js-source-file URL [_ ^URL source]
120+
(js-source-file (io/file (.getPath source))))
121+
119122
(defmethod js-source-file BufferedInputStream [^String name ^BufferedInputStream source]
120123
(SourceFile/fromInputStream name source))
121124

0 commit comments

Comments
 (0)