     ;; TODO: more error types go here
     :else nil))
 
-(defn- red-line? [s]
-  (.test #"\[31m" s))
-
 (defn- extract-error-msg [full-error-txt]
   (->> full-error-txt
     split-lines


(defn- extract-target-from-start-msg [s]
  (-> s
    (replace #"^.*Compiling \"" "")
    (replace #"\".+$" "")))
(def js-spawn (aget child-proc "spawn"))

;;------------------------------------------------------------------------------
;; Determine Compiler Output Line Type
;;------------------------------------------------------------------------------

;; NOTE: this probably belongs in it's own library or emitted as EDN from the
;; compiler itself
;; we can get by with regex and duct tape for now ;)

(defn- red-line? [s]
  (.test #"\[31m" s))

(def ^:private stopped-signal (str "*** OUTPUT STOPPED *** " (uuid)))

(defn- end-line? [s]
  (or (.test #"Subprocess failed" s)
      (= s stopped-signal)))

(defn- success-line? [s]
  (and (.test #"Successfully compiled" s)
       (.test #"seconds\." s)))

(defn- warning-line? [s]
  (.test #"^WARNING: " s))

(defn- start-line? [s]
  (and (.test #"Compiling " s)
       (.test #"]\.\.\.$" s)))

(defn- determine-line-type
  "Returns the type of line output from the compiler.
   nil if we do not recognize the line or don't care what it is"
  [s]
  (cond
    (red-line? s) :error
    (end-line? s) :end-output
    (success-line? s) :success
    (warning-line? s) :warning
    (start-line? s) :start
    :else nil))

;;------------------------------------------------------------------------------
;; Extract Info From Lines
;;------------------------------------------------------------------------------

(defn- extract-time-from-success-msg [s]
  (-> s
