Skip to content

Instantly share code, notes, and snippets.

@micha
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save micha/30a1866d36a7326cb86a to your computer and use it in GitHub Desktop.

Select an option

Save micha/30a1866d36a7326cb86a to your computer and use it in GitHub Desktop.
(set-env!
:resource-paths #{"src"}
:dependencies '[[tailrecursion/warp "0.1.0"]])
(require
'[clojure.java.io :as io])
(deftask mytask
"My demo task."
[]
(let [tmpdir (temp-dir!)]
(with-pre-wrap fileset
(loop [fileset fileset
[f & fs] (->> fileset input-files (by-ext [".lc"]))]
(if f
(do (doto (io/file tmpdir (str (tmppath f) ".uc"))
io/make-parents
(spit (.toUpperCase (slurp (tmpfile f)))))
(recur (rm! fileset [f]) fs))
(-> fileset (add-resource! tmpdir) commit!))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment