       charset "utf-8"}}
     :as options]]
   (let [compressor (JavaScriptCompressor.
-                    (StringReader. (last input))
+                    (StringReader. (get-contents file-map))
                     nil)
         writer (StringWriter.)]
     (.compress

     verbose?
     preserve-semi?
     disable-optimizations?)
    {(first input) (.toString (.getBuffer writer))}))

(defn- compress-stylesheet*
  "Calls the YUI compressor and returns the compressed css as a string.

  Input is a vector with the filename as the first value and file's contents as the second value."
  [input &
   [{:keys
     [line-break
      charset]

(ns swiss.core
  (:require [clojure.java.shell :refer [sh]]
            [clojure.string :refer [join]]
            [digest :refer [md5]])
  (:import [com.yahoo.platform.yui.compressor CssCompressor JavaScriptCompressor]
           [java.nio.file FileSystems]
           [java.io File InputStreamReader StringReader StringWriter]))

(defn get-filename
  [file-map]
  (-> file-map keys first))

(defn get-contents
  [file-map]
  (-> file-map vals first))

(defn- compress-javascript*
  "Calls the YUI compressor and returns the compressed js as a string.

  file-map is a map with a key of the filename and
  value being the file's contents."
  [file-map &
   [{:keys
     [disable-optimizations?
      preserve-semi?
