    :target (.getName (file target))
    :original-size (total-size sources)})
 
-(defn minify-js [path target & [{:keys [quiet? externs optimization]
+(defn minify-js [path target & [{:keys [quiet? externs optimization language]
                                  :or {quiet? false
+                                      language :ecmascript3
                                       externs []
                                       optimization :simple}}]]
   (delete-target target)

      (.setOptionsForCompilationLevel options))
  options)

(defn- compile-js [compiler assets externs optimization]
  (let [options  (-> (CompilerOptions.)
                     (doto (.setOutputCharset "UTF-8"))
                     (set-optimization optimization))]


        (com.google.javascript.jscomp.Compiler/setLoggingLevel Level/SEVERE))
      (let [assets   (aggregate path ".js")
            compiler (com.google.javascript.jscomp.Compiler.)
            result   (compile-js compiler assets externs optimization language)]
        (with-open [wrt (writer target)]
          (.append wrt (.toSource compiler)))
        (merge result (compression-details assets (file target)))))))
