Skip to content

Instantly share code, notes, and snippets.

@viksit
Forked from anonymous/gist:8f2c26809ed88f0e6dd0
Created October 8, 2014 08:04
Show Gist options
  • Save viksit/55379a721047f7280746 to your computer and use it in GitHub Desktop.
Save viksit/55379a721047f7280746 to your computer and use it in GitHub Desktop.
(ns ncdoffice.macros
(:require [clojure.java.io :as io])
(:require [kioo.core :as kioo])
(:require [kioo.om :refer [deftemplate]]))
(defmacro filecomponent [path transforms]
(let [file (io/file (str "build/client/" path))]
`(kioo/component ~file ~transforms)
))
<nonuby> then you can just use (render [_] (filecomponent "myhtml.html {})
* sveri (~sveri@ipb2196839.dynamic.kabel-deutschland.de) has joined #clojure
<nonuby> the last args is the transformations - which ive left empty, but usually want to make some
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment