Skip to content

Commit

Permalink
Updates for Clojure 1.3, Stencil 0.2.0, and Clostache 0.6.0.
Browse files Browse the repository at this point in the history
* Updated Clojure to 1.3.
* Updated to Stencil 0.2.0.
* Updated to Clostache 0.6.0.
* Commented out Mustache.clj support, since it appears to not work on Clojure 1.3 yet.
  • Loading branch information
davidsantiago committed Nov 17, 2011
1 parent 650ff73 commit 66655eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
11 changes: 5 additions & 6 deletions project.clj
@@ -1,8 +1,7 @@
(defproject mustachequerade "0.0.1-SNAPSHOT"
(defproject mustachequerade "0.0.2-SNAPSHOT"
:description "TODO: add summary of your project"
:dependencies [[clojure "1.2.0"]
[stencil "0.1.0"]
[com.github.fhd.clostache/clostache "0.4.1"]
:dependencies [[clojure "1.3.0"]
[stencil "0.2.0"]
[de.ubercode.clostache/clostache "0.6.0"]
[mustache "0.1.0-SNAPSHOT"]]
:dev-dependencies [[swank-clj "0.1.6-SNAPSHOT"]]
:tasks [cake.tasks.swank-clj])
:dev-dependencies [[ritz "0.2.0"]])
26 changes: 13 additions & 13 deletions src/mustachequerade/core.clj
@@ -1,7 +1,7 @@
(ns mustachequerade.core
(:require [stencil.core :as stencil]
[clostache.parser :as clostache]
[mustache :as mustache]))
#_[mustache :as mustache]))

(defn run-main-bench []
(println "Stencil main.mustache, 10000x: ")
Expand All @@ -23,18 +23,18 @@
:width 4968})
))
)
(println "Mustache.clj main.mustache, 10000x:")
(let [cached-template
(mustache/compile (slurp "resources/templates/main.mustache"))]
(time
(dotimes [_ 10000]
(with-out-str (cached-template
{:projects [{:name "resque"
:url "http://github.com/defunkt/resque"
:description "A Redis-backed Ruby library for queueing and working."}]
:width 4968}))
))
)
(comment (println "Mustache.clj main.mustache, 10000x:")
(let [cached-template
(mustache/compile (slurp "resources/templates/main.mustache"))]
(time
(dotimes [_ 10000]
(with-out-str (cached-template
{:projects [{:name "resque"
:url "http://github.com/defunkt/resque"
:description "A Redis-backed Ruby library for queueing and working."}]
:width 4968}))
))
))
)

;; Don't use this, Clostache throws an exceptions for some reason.
Expand Down

0 comments on commit 66655eb

Please sign in to comment.