Skip to content

Commit

Permalink
growl task
Browse files Browse the repository at this point in the history
  • Loading branch information
pleasetrythisathome committed Dec 12, 2014
1 parent 057869c commit f15da2e
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion build.boot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit f15da2e

Please # to comment.