From a03c5a67d8239fb3b26fa7e06c3a3bf777f1eb42 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 1 Jun 2014 17:04:18 -0400 Subject: [PATCH] add core function to toggle :check-for-minified-web-resources on/off --- src/clj_jtwig/core.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/clj_jtwig/core.clj b/src/clj_jtwig/core.clj index 12949c9..260de2c 100644 --- a/src/clj_jtwig/core.clj +++ b/src/clj_jtwig/core.clj @@ -30,6 +30,13 @@ [enable?] (swap! options assoc :skip-file-status-checks enable?)) +(defn toggle-check-for-minified-web-resources! + "toggle a check for minified equivalents of css/js files when using the web functions 'stylesheet' and + 'javascript'. when this is enabled, if a '.min.js' or '.min.css' equivalent file exists for the url + passed to these two functions, then it will be used instead of the original file specified." + [enable?] + (swap! options assoc :check-for-minified-web-resources enable?)) + ; cache of compiled templates. key is the file path. value is a map with :last-modified which is the source file's ; last modification timestamp and :template which is a com.lyncode.jtwig.tree.api.Content object which has been ; compiled already and can be rendered by calling it's 'render' method