File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 18641864
18651865(defn add-source-map-link [{:keys [source-map output-to] :as opts} js]
18661866 (if source-map
1867- (if (= output-to :print )
1868- (str js " \n //# sourceMappingURL=" source-map)
1869- (str js " \n //# sourceMappingURL=" (path-relative-to (io/file output-to) {:url source-map})))
1867+ (if (= output-to :print )
1868+ (str js " \n //# sourceMappingURL=" source-map " \n\n " )
1869+ (str js " \n //# sourceMappingURL=" (path-relative-to (io/file output-to) {:url source-map}) " \n\n " ))
18701870 js))
18711871
18721872(defn absolute-path? [path]
Original file line number Diff line number Diff line change 12791279 (defn emit-source-map [src dest sm-data opts]
12801280 (let [sm-file (io/file (str (.getPath ^File dest) " .map" ))]
12811281 (if-let [smap (:source-map-asset-path opts)]
1282- (emits " \n //# sourceMappingURL=" smap
1282+ (emitln " \n //# sourceMappingURL=" smap
12831283 (string/replace (util/path sm-file)
12841284 (str (util/path (io/file (:output-dir opts))))
12851285 " " )
12881288 (if-not (string/index-of smap " ?" ) " ?" " &" )
12891289 " rel=" (System/currentTimeMillis ))
12901290 " " ))
1291- (emits " \n //# sourceMappingURL="
1291+ (emitln " \n //# sourceMappingURL="
12921292 (or (:source-map-url opts) (.getName sm-file))
12931293 (if (true ? (:source-map-timestamp opts))
12941294 (str " ?rel=" (System/currentTimeMillis ))
You can’t perform that action at this time.
0 commit comments