                             (sh/sh "rm" "-rf" dir))
                           (.mkdirs (java.io.File. dir))
                           (spit filename source)
-                          (compile-cljs hash filename)
+                          (comp/compile-cljs hash filename)
                           (s3/upload-file
                             (str dir "/code.js")
                             (str hash "/code.js"))

                   (->> second-half
                        (drop half-take-out)
                        (apply str)))))))

(defn safe-slurp [s]
  (when s
    (try
      (slurp s)
      (catch java.io.FileNotFoundException e nil))))

(defn guess-gist-ns [root-path]
  (->> (file-seq (java.io.File. root-path))
       (map #(.getAbsolutePath %))
       (filter #(.endsWith % ".cljs"))
       first
       safe-slurp
       parse-meta
       :ns))

(defn sketch-page [login gist-id {:keys [doc ns created url user source inky-version]}]
  (let [sketch-url (str "/" login "/" gist-id "/sketch")

       [:div.row
        [:div.col-sm-121
         "inky.cc is brought to you by "
         [:a {:href "https://twitter.com/heyzk"} "@heyzk"]]]]]ga-tag]))

(defn render-compiling []
  ($layout
