 (defn optimizations-none?
   "returns true if a build has :optimizations set to :none"
   [build]
-  (= :none (get-in build [:compiler :optimizations])))
+  (let [opt (get-build-options build :optimizations)]
+    (or (nil? opt) (= :none opt))))
 
 ;; checking to see if output dir is in right directory
 (defn norm-path

      options)))

(comment
  (sane-output-to-dir {:output-dir "yes"})

  (sane-output-to-dir {:output-to "yes.js"})

  (sane-output-to-dir {:output-dir "yes/there"})

  (sane-output-to-dir {:output-to "outer/yes.js"})  
  
  )

(defn fix-build-options [build-options]
  (->> build-options
    (apply-to-key normalize-dir :output-dir)
    (sane-output-to-dir)
    (apply-to-key namify-module-entries :modules)

  (let [f (io/file fpath)]
    (when-let [dir (.getParentFile f)] (.mkdirs dir))))

(defn get-build-options
  ([build]
   (or (:build-options build) (:compiler build) {}))
  ([build key]
   (get (get-build-options build) key)))

(defn ensure-output-dirs* [{:keys [build-options compiler]}]
  (let [{:keys [output-to]} (or build-options compiler)]
    (when output-to
