Skip to content

Commit

Permalink
Add template macro to boot core -- fixes #387
Browse files Browse the repository at this point in the history
  • Loading branch information
micha committed May 24, 2016
1 parent 9712c7f commit fb64f8e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion boot/core/src/boot/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
[boot.tmpdir :as tmpd]
[boot.util :as util]
[boot.from.io.aviso.exception :as ex]
[boot.from.clojure.tools.cli :as cli])
[boot.from.clojure.tools.cli :as cli]
[boot.from.backtick :as bt])
(:import
[boot App]
[java.io File]
Expand Down Expand Up @@ -1078,6 +1079,13 @@

;; Task Utility Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defmacro template
"The syntax-quote (aka quasiquote) reader macro as a normal macro. Provides
the unquote ~ and unquote-splicing ~@ metacharacters for templating forms
without performing symbol resolution."
[form]
`(bt/template ~form))

(defn gpg-decrypt
"Uses gpg(1) to decrypt a file and returns its contents as a string. The
:as :edn option can be passed to read the contents as an EDN form."
Expand Down

0 comments on commit fb64f8e

Please sign in to comment.