            com.google.javascript.jscomp.JSError
            com.google.javascript.jscomp.CommandLineRunner))
 
+;; The prefix under which compiled ClojureScript files may be found on
+;; the classpath.
+(def cljs-classpath-root "cljs/")
+
 (def name-chars (map char (concat (range 48 57) (range 65 90) (range 97 122))))
 
 (defn random-char []

  (apply str (interpose "\n" (map #(add-dep-string opts %) sources))))

(comment
  (path-relative-to (io/file "out/goog/base.js") {:url (io/resource "core.js")})
  (add-dep-string {} {:url (io/resource "core.js") :requires ["goog.string"] :provides ["cljs.core"]})
  (deps-file {} [{:url (io/resource "core.js") :requires ["goog.string"] :provides ["cljs.core"]}])  
  )

(defn output-one-file [{:keys [output-to]} js]

  "Compile ClojureScript to JavaScript with optimizations from Google
   Closure Compiler producing runnable JavaScript.

   The classpath must contain compiler.jar and cljs/core.js as well as
   any other compiled ClojureScript files that you will need, all of
   which must be under cljs/.

   Use the 'build' function for end-to-end compilation.

   build = compile -> add-dependencies -> optimize -> output

   Two protocols are defined: IJavaScript and Compilable. The
   Compilable protocol is satisfied by something which can return one
