    [leiningen.core.eval :as leval]
    [leiningen.clean :as clean]
    [leiningen.core.main :as main]
+   [leiningen.trampoline :as tramp]
    [clojure.java.io :as io]
    [clojure.set :refer [intersection]]
    [leiningen.figwheel.fuzzy :as fuz]

(defmethod fig-dispatch ":help" [_ project build-ids]
  (println (:doc (meta #'figwheel))))

(defn figwheel
"Figwheel - a tool that helps you compile and reload ClojureScript.


  ignored.

  To learn more about configuring Figwheel please see the README at
  https://github.com/bhauman/lein-figwheel"
  [project & command-and-or-build-ids]
  (let [[command & build-ids] command-and-or-build-ids]
    (when-not ((every-pred command-like? report-if-bad-command) command)
      (let [[command build-ids] (if (command-like? command)
                                    [command build-ids]
                                    [nil (and command (cons command build-ids))])]
        (if (and
             (or (= nil command)
                 (= ":reactor" command))
             (get-in project [:figwheel :repl] true))
          (if tramp/*trampoline?*
            (launch-figwheel command project build-ids)
            (apply tramp/trampoline project "figwheel" command-and-or-build-ids))
          (launch-figwheel command project build-ids))))))
