add strict-mode option support
This commit is contained in:
parent
68c2beb863
commit
77a10a38d7
|
@ -24,10 +24,15 @@
|
|||
see clj-jtwig.options for the option keys you can specify here."
|
||||
[& opts]
|
||||
(doseq [[k v] (apply hash-map opts)]
|
||||
(if (= :cache-compiled-templates k)
|
||||
(cond
|
||||
(= k :cache-compiled-templates)
|
||||
; always clear the cache when toggling. this will help ensure that any possiblity of weird behaviour from
|
||||
; leftover stuff being stuck in the cache pre-toggle-on/off won't happen
|
||||
(flush-template-cache!))
|
||||
(flush-template-cache!)
|
||||
|
||||
(= k :strict-mode)
|
||||
(-> configuration .parse (.strictMode v)))
|
||||
|
||||
(swap! options assoc k v)))
|
||||
|
||||
; cache of compiled templates. key is the file path. value is a map with :last-modified which is the source file's
|
||||
|
|
|
@ -41,4 +41,7 @@
|
|||
; the root path (relative to the classpath) where web resources such as js, css, images are
|
||||
; located. typically in your project structure this path will be located under the
|
||||
; "resources" directory.
|
||||
:web-resource-path-root "public"}))
|
||||
:web-resource-path-root "public"
|
||||
|
||||
; when enabled, exceptions will be thrown when attempting to use variables that do not exist
|
||||
:strict-mode false}))
|
Reference in a new issue