   (let [state (build-index coll)]
     (distinct (:order (reduce comp/dependency-order-visit (assoc state :order []) (keys state))))))
 
+(defn js-dependency-index
+  "Returns the index for all JavaScript dependencies. Lookup by
+  namespace or file name."
+  [opts]
+  (build-index (concat (goog-dependencies) (library-dependencies opts))))
+
 (defn dependencies
   "Given a sequence of Closure namespace strings, return the list of
   all dependencies in dependency order. The returned list includes all

  (let [requires (mapcat -requires inputs)
        required-cljs (cljs-dependencies opts requires)
        required (dependencies opts (concat (mapcat -requires required-cljs) requires))]
    (concat (map #(-> (javascript-file (or (:url %) (io/resource (:file %)))
                                       (:provides %)
                                       (:requires %))
                      (assoc :group (:group %))) required)
            required-cljs
            inputs)))

(comment
  ;; add dependencies to literal js

  the value is a list of directories containing third-party
  libraries."
  [opts requires]
  (let [index (js-dependency-index opts)]
    (loop [requires requires
           deps []]
      (if (seq requires)
