 (defn add-header [opts js]
   (str (make-preamble opts) js))
 
-(defn add-foreign-deps [opts sources js]
+(defn foreign-deps-str [sources]
   (letfn [(to-js-str [ijs]
-            (util/debug-prn (into {} ijs))
             (let [url (or (:url-min ijs) (:url ijs))]
               (slurp url)))]
-    (apply str (concat (map to-js-str sources) [js]))))
+    (apply str (map to-js-str sources))))
 
 (defn add-wrapper [{:keys [output-wrapper] :as opts} js]
   (if output-wrapper

                               (remove foreign-source? js-sources)))
                           (add-wrapper all-opts)
                           (add-source-map-link all-opts)
                           (add-foreign-deps all-opts
                             (filter foreign-source? js-sources))
                           (add-header all-opts)
                           (output-one-file all-opts)))
                       (apply output-unoptimized all-opts js-sources))]

                            merged)
                          (assoc merged path (get closure-source-map path))))
                      merged)))
                (spit
                  (io/file name)
                  (sm/encode merged
                    {:preamble-line-count (+ preamble-line-count
                                             (or (:foreign-deps-line-count opts) 0))
                     :lines (+ (:lineCount sm-json) preamble-line-count 2)
                     :file (:file sm-json)
                     :output-dir (util/output-directory opts)
                     :source-map-path (:source-map-path opts)
                     :source-map (:source-map opts)
                     :relpaths relpaths}))))))
        source)
      (report-failure result))))

