Add laser.
This commit is contained in:
parent
c9070ae749
commit
3ef72c09c3
|
@ -10,4 +10,5 @@
|
|||
[enlive "1.0.0"]
|
||||
[hiccup "1.0.2"]
|
||||
[stencil "0.3.0"]
|
||||
[tinsel "0.4.0"]])
|
||||
[tinsel "0.4.0" :exclusions [hickory]]
|
||||
[me.raynes/laser "0.1.21"]])
|
|
@ -3,7 +3,8 @@
|
|||
tinsel.core)
|
||||
(:require [clabango.parser :refer [render render-file]]
|
||||
[stencil.core :as stencil]
|
||||
[hiccup.core :as hiccup]))
|
||||
[hiccup.core :as hiccup]
|
||||
[me.raynes.laser :as laser :refer [defdocument]]))
|
||||
|
||||
(def bar (str "bar"))
|
||||
|
||||
|
@ -59,6 +60,12 @@
|
|||
(deftemplate simple-tinsel [[:span {:class "foo"}]] [] (has-class? "foo") (set-content bar))
|
||||
(deftemplate list-tinsel [[:ul]] [ceil] (tag= :ul) (set-content (for [x (range 1 ceil)] [:li x])))
|
||||
|
||||
(defdocument simple-laser "<span class=\"foo\"></span>" []
|
||||
(laser/class= "foo") (laser/content bar))
|
||||
(defdocument list-laser "<ul></ul>" [ceil]
|
||||
(laser/element= :ul) (laser/html-content
|
||||
(for [x (range 1 ceil)]
|
||||
(laser/node :li :content (str x)))))
|
||||
|
||||
(defn simple-enlive []
|
||||
(str ""))
|
||||
|
@ -72,53 +79,53 @@
|
|||
;; (println (count (list-filler-hiccup)))
|
||||
;; (println (count (list-filler-clabango-no-fd)))
|
||||
|
||||
;; (println "\n\n ***** str benchmarks ***** \n\n")
|
||||
;; (with-progress-reporting (quick-bench (simple-str)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-str 50)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-str 1000)))
|
||||
;; (println "\n --- \n")
|
||||
(println "\n\n ***** str benchmarks ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-str)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-str 50)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-str 1000)))
|
||||
(println "\n --- \n")
|
||||
|
||||
;; (println "\n\n ***** hiccup benchmarks ***** \n\n")
|
||||
;; (with-progress-reporting (quick-bench (simple-hiccup)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-hiccup 50)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-hiccup 1000)))
|
||||
;; (println "\n --- \n")
|
||||
(println "\n\n ***** hiccup benchmarks ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-hiccup)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-hiccup 50)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-hiccup 1000)))
|
||||
(println "\n --- \n")
|
||||
|
||||
;; (println "\n\n ***** clabango string ***** \n\n")
|
||||
;; (quick-bench (simple-clabango-no-fd))
|
||||
;; (println "\n --- \n")
|
||||
;; (quick-bench (list-clabango-no-fd 50))
|
||||
;; (println "\n --- \n")
|
||||
;; (quick-bench (list-clabango-no-fd 1000))
|
||||
;; (println "\n --- \n")
|
||||
(println "\n\n ***** clabango string ***** \n\n")
|
||||
(quick-bench (simple-clabango-no-fd))
|
||||
(println "\n --- \n")
|
||||
(quick-bench (list-clabango-no-fd 50))
|
||||
(println "\n --- \n")
|
||||
(quick-bench (list-clabango-no-fd 1000))
|
||||
(println "\n --- \n")
|
||||
|
||||
;; (println "\n\n ***** clabango from file template ***** \n\n")
|
||||
;; (with-progress-reporting (quick-bench (simple-clabango)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-clabango 50)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-clabango 1000)))
|
||||
;; (println "\n --- \n")
|
||||
(println "\n\n ***** clabango from file template ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-clabango)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-clabango 50)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-clabango 1000)))
|
||||
(println "\n --- \n")
|
||||
|
||||
;; (println "\n\n ***** stencil string ***** \n\n")
|
||||
;; (with-progress-reporting (quick-bench (simple-stencil-no-fd)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-stencil-no-fd 50)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-stencil-no-fd 1000)))
|
||||
;; (println "\n --- \n")
|
||||
(println "\n\n ***** stencil string ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-stencil-no-fd)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-stencil-no-fd 50)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-stencil-no-fd 1000)))
|
||||
(println "\n --- \n")
|
||||
|
||||
;; (println "\n\n ***** stencil file ***** \n\n")
|
||||
;; (with-progress-reporting (quick-bench (simple-stencil)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-stencil 50)))
|
||||
;; (println "\n --- \n")
|
||||
;; (with-progress-reporting (quick-bench (list-stencil 1000)))
|
||||
;; (println "\n --- \n")
|
||||
(println "\n\n ***** stencil file ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-stencil)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-stencil 50)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-stencil 1000)))
|
||||
(println "\n --- \n")
|
||||
|
||||
(println "\n\n ***** tinsel ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-tinsel)))
|
||||
|
@ -127,4 +134,12 @@
|
|||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-tinsel 1000)))
|
||||
(println "\n --- \n")
|
||||
)
|
||||
|
||||
(println "\n\n ***** laser ***** \n\n")
|
||||
(with-progress-reporting (quick-bench (simple-laser)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-laser 50)))
|
||||
(println "\n --- \n")
|
||||
(with-progress-reporting (quick-bench (list-laser 1000)))
|
||||
(println "\n --- \n")
|
||||
)
|
Reference in a new issue