     (.getAbsolutePath (io/file "deps/closure-library/closure"))
     ["resources"])
 
+  (compile "resources")ompile
+
   ;; Parsing example
   ;; based on http://slieb.org/blog/parseJavaScriptWithGoogleClosure/
   (let [config       (ParserRunner/createConfig

(ns jsx-fun.core
  (:require [clojure.java.io :as io]
            [clojure.string :as string]
            [cljs.closure :as cl])

         (println [level error]
           (println error)))))))

(defn compile
  ([dir]
   (compile dir "out"))
  ([dir outdir]
   (letfn [(dir? [^File x] (.isDirectory x))]
     (doseq [file (remove dir? (file-seq (io/file dir)))]
       (spit (io/file outdir (.getName file))
         (transform-commonjs
           (transform-jsx (slurp file))))))))

;(defn transform-commonjs
;  [filename src]
;  (let [^List externs '()
