Skip to content
Permalink
Browse files

CLJS-2256: Generated code doesn't add newline after sourceMappingURL …

…comment
  • Loading branch information...
anmonteiro authored and swannodette committed Jul 17, 2017
1 parent 7139c4c commit 62926332a78e89935f5aa263195fc29cc297c3b7
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/main/clojure/cljs/closure.clj
  2. +2 −2 src/main/clojure/cljs/compiler.cljc
@@ -1864,9 +1864,9 @@

(defn add-source-map-link [{:keys [source-map output-to] :as opts} js]
(if source-map
(if (= output-to :print)
(str js "\n//# sourceMappingURL=" source-map)
(str js "\n//# sourceMappingURL=" (path-relative-to (io/file output-to) {:url source-map})))
(if (= output-to :print)
(str js "\n//# sourceMappingURL=" source-map "\n\n")
(str js "\n//# sourceMappingURL=" (path-relative-to (io/file output-to) {:url source-map}) "\n\n"))
js))

(defn absolute-path? [path]
@@ -1279,7 +1279,7 @@
(defn emit-source-map [src dest sm-data opts]
(let [sm-file (io/file (str (.getPath ^File dest) ".map"))]
(if-let [smap (:source-map-asset-path opts)]
(emits "\n//# sourceMappingURL=" smap
(emitln "\n//# sourceMappingURL=" smap
(string/replace (util/path sm-file)
(str (util/path (io/file (:output-dir opts))))
"")
@@ -1288,7 +1288,7 @@
(if-not (string/index-of smap "?") "?" "&")
"rel=" (System/currentTimeMillis))
""))
(emits "\n//# sourceMappingURL="
(emitln "\n//# sourceMappingURL="
(or (:source-map-url opts) (.getName sm-file))
(if (true? (:source-map-timestamp opts))
(str "?rel=" (System/currentTimeMillis))

0 comments on commit 6292633

Please sign in to comment.
You can’t perform that action at this time.