diff --git a/build.boot b/build.boot index c5175a2..13df72b 100644 --- a/build.boot +++ b/build.boot @@ -16,7 +16,37 @@ '[adzerk.boot-reload :refer [reload]] '[deraen.boot-cljx :refer [cljx]] '[pandeiro.http :refer [serve]] - '[clojure.tools.namespace.repl :refer [set-refresh-dirs]]) + '[clojure.tools.namespace.repl :refer [set-refresh-dirs]] + + '[boot.util :as util] + '[boot.pod :as pod]) + +(deftask growl + "Growl notifications during build." + [] + (let [] + (pod/add-dependencies-worker {:dependencies '[[jakemcc/clojure-gntp "0.1.1"]]}) + (fn [continue] + (fn [event] + (try + (util/with-let [ret (continue event)] + (pod/call-worker + (if (zero? @*warnings*) + `(jakemcc.clojure-gntp.gntp/message "Boot - success" "" + :appname "boot" + :app "boot" + :notification "boot-notify") + `(jakemcc.clojure-gntp.gntp/message "Boot - warning(s)" ~(deref *warnings*) + :appname "boot" + :app "boot" + :notification "boot-notify")))) + (catch Throwable t + (pod/call-worker + `(jakemcc.clojure-gntp.gntp/message "Boot - error" ~(str (.getMessage t)) + :appname "boot" + :app "boot" + :notification "boot-notify")) + (throw t))))))) (deftask development "watch and compile cljx, css, cljs, init cljs-repl and push changes to browser" @@ -26,6 +56,8 @@ (apply set-refresh-dirs (get-env :src-paths)) (comp (serve :dir "target") (watch) + ;; (speak :success "") + (growl) (cljx) (cljs-repl) (cljs :output-to "main.js"