 (defn prep-builds [builds]
   (-> builds
       map-to-vec-builds
-      (->> (mapv #(dissoc % :warning-handlers)))
-      fix-builds
-      prep-builds-for-figwheel-client
-      ensure-output-dirs
-      no-seqs))
+      (->> (mapv prep-build))))
 
 (defn prep-options
   "Normalize various configuration input."

                  module-map))
    module-map))

(defn opt-none? [{:keys [optimizations]}]
  (or (nil? optimizations) (= optimizations :none)))

;; TODO this is a hack need to check all the places that I'm checking for
;; :optimizations :none and check for nil? or :none
(defn default-optimizations-to-none [build-options]
  (if (opt-none? build-options)
    (assoc build-options :optimizations :none)
    build-options))


    (apply-to-key namify-module-entries :modules)
    (apply-to-key name :main)))

(defn move-compiler-to-build-options [build]
  (-> build
      (assoc :build-options (get-build-options build))
      (dissoc :compiler)))

(defn ensure-id
  "Converts given build :id to a string and if no :id exists generate and id."
  [opts]
  (assoc opts
         :id (name (or
                    (:id opts)
                    (gensym "build_needs_id_")))))

(defn prep-build [build]
  (-> build
      (dissoc :warning-handlers)
      ensure-id
      move-compiler-to-build-options
      (update-in [:build-options] fix-build-options)
      prep-build-for-figwheel-client
      forward-devcard-option
      ensure-output-dirs!
      no-seqs
      (vary-meta assoc ::prepped true)))

(defn prepped? [build]
  (-> build meta ::prepped))

(defn update-figwheel-connect-options [figwheel-server build]
  (if (figwheel-build? build)
