Skip to content

Instantly share code, notes, and snippets.

@mudphone
Created October 29, 2017 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mudphone/1b56d09c548c5d602d04588419aad7dd to your computer and use it in GitHub Desktop.
Save mudphone/1b56d09c548c5d602d04588419aad7dd to your computer and use it in GitHub Desktop.
(set-env!
:source-paths #{"src"}
:dependencies '[])
(require '[boot.core :as c]
'[clojure.java.io :as io])
(deftask my-count
"Count records"
[]
(let [tmp (c/tmp-dir!)]
(fn middleware [next-handler]
(fn handler [fileset]
(c/empty-dir! tmp)
(let [f (io/file tmp "hello.txt")
_ (doto f
io/make-parents
(spit "hello world"))]
(-> fileset
(c/add-asset tmp)
c/commit!
next-handler))))))
(deftask dev
"Build my report."
[]
(comp (my-count)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment